]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-buffer-to-switch): Add table to icomplete-with-completion-tables.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Feb 2009 02:19:53 +0000 (02:19 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Feb 2009 02:19:53 +0000 (02:19 +0000)
lisp/ChangeLog
lisp/files.el

index d91c796b266ce574a6001632cafc3f205d8b90ed..e2e2a17ea53e29776e7ad020c35f648373bba52e 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * files.el (read-buffer-to-switch):
+       Add table to icomplete-with-completion-tables.
+
 2009-02-11  Chong Yidong  <cyd@stupidchicken.com>
 
        * dired-aux.el (dired-add-entry): Avoid munging long-form Dired
@@ -28,8 +33,8 @@
 
 2009-02-11  Chong Yidong  <cyd@stupidchicken.com>
 
-       * 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  <eric.hanchrow@gmail.com>  (tiny change)
 
index eed4b0418110faeb91f0c7b80f2018b5f4626648..84995d20a2db16ccbb04ced7441cb631731749f9 100644 (file)
@@ -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)))))