From 70ff4f59668ede653e7371500da0ee63471840a7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 12 Feb 2009 02:19:53 +0000 Subject: [PATCH] (read-buffer-to-switch): Add table to icomplete-with-completion-tables. --- lisp/ChangeLog | 9 +++++++-- lisp/files.el | 12 +++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d91c796b266..e2e2a17ea53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-02-12 Stefan Monnier + + * files.el (read-buffer-to-switch): + Add table to icomplete-with-completion-tables. + 2009-02-11 Chong Yidong * dired-aux.el (dired-add-entry): Avoid munging long-form Dired @@ -28,8 +33,8 @@ 2009-02-11 Chong Yidong - * emacs-lisp/find-func.el (find-library-name, find-library): Doc - fixes. (Part of bug#2270) + * emacs-lisp/find-func.el (find-library-name, find-library): + Doc fixes. (Part of bug#2270) 2009-02-10 Eric Hanchrow (tiny change) diff --git a/lisp/files.el b/lisp/files.el index eed4b041811..84995d20a2d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1156,7 +1156,17 @@ need to omit the name of current buffer from the list of completions and default values." (let ((rbts-completion-table (internal-complete-buffer-except))) (minibuffer-with-setup-hook - (lambda () (setq minibuffer-completion-table rbts-completion-table)) + (lambda () + (setq minibuffer-completion-table rbts-completion-table) + ;; Since rbts-completion-table is built dynamically, we + ;; can't just add it to the default value of + ;; icomplete-with-completion-tables, so we add it + ;; here manually. + (if (and (boundp 'icomplete-with-completion-tables) + (listp icomplete-with-completion-tables)) + (set (make-local-variable 'icomplete-with-completion-tables) + (cons rbts-completion-table + icomplete-with-completion-tables)))) (read-buffer prompt (other-buffer (current-buffer)) (confirm-nonexistent-file-or-buffer))))) -- 2.11.4.GIT