1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(read-buffer-to-switch): Add table to icomplete-with-completion-tables.

This commit is contained in:
Stefan Monnier 2009-02-12 02:19:53 +00:00
parent 7f7f59f5c3
commit 70ff4f5966
2 changed files with 18 additions and 3 deletions

View 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)))))