aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2017-08-06 10:15:17 -0400
committerMark Oteiza2017-08-06 10:15:17 -0400
commitc2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623 (patch)
tree06f1ed9d7e5e2723917c0163c98035d7aba33acb
parentb1b99edd3ee587a5154106d4d16547eac4916c55 (diff)
downloademacs-c2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623.tar.gz
emacs-c2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623.zip
; Fix previous commit
The mailcap minibuffer completion used dynamic binding. Locally set a dynamic variable. * lisp/dired-aux.el: Store list of files in `minibuffer-completion-table'.
-rw-r--r--lisp/dired-aux.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 0a8ec26f7ca..2b89e527c30 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -619,8 +619,9 @@ with a prefix argument."
619This function is used to add all related commands retrieved by `mailcap' 619This function is used to add all related commands retrieved by `mailcap'
620to the end of the list of defaults just after the default value." 620to the end of the list of defaults just after the default value."
621 (interactive) 621 (interactive)
622 (let ((commands (and (boundp 'files) (require 'mailcap nil t) 622 (let* ((files minibuffer-completion-table)
623 (mailcap-file-default-commands files)))) 623 (commands (and (require 'mailcap nil t)
624 (mailcap-file-default-commands files))))
624 (if (listp minibuffer-default) 625 (if (listp minibuffer-default)
625 (append minibuffer-default commands) 626 (append minibuffer-default commands)
626 (cons minibuffer-default commands)))) 627 (cons minibuffer-default commands))))
@@ -638,6 +639,7 @@ This normally reads using `read-shell-command', but if the
638offer a smarter default choice of shell command." 639offer a smarter default choice of shell command."
639 (minibuffer-with-setup-hook 640 (minibuffer-with-setup-hook
640 (lambda () 641 (lambda ()
642 (set (make-local-variable 'minibuffer-completion-table) files)
641 (set (make-local-variable 'minibuffer-default-add-function) 643 (set (make-local-variable 'minibuffer-default-add-function)
642 'minibuffer-default-add-dired-shell-commands)) 644 'minibuffer-default-add-dired-shell-commands))
643 (setq prompt (format prompt (dired-mark-prompt arg files))) 645 (setq prompt (format prompt (dired-mark-prompt arg files)))