summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-08-06 10:15:17 -0400
committerMark Oteiza <mvoteiza@udel.edu>2017-08-06 10:15:17 -0400
commitc2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623 (patch)
tree06f1ed9d7e5e2723917c0163c98035d7aba33acb /lisp
parentb1b99edd3ee587a5154106d4d16547eac4916c55 (diff)
downloademacs-c2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623.tar.gz
emacs-c2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623.tar.bz2
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'.
Diffstat (limited to 'lisp')
-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."
This function is used to add all related commands retrieved by `mailcap'
to the end of the list of defaults just after the default value."
(interactive)
- (let ((commands (and (boundp 'files) (require 'mailcap nil t)
- (mailcap-file-default-commands files))))
+ (let* ((files minibuffer-completion-table)
+ (commands (and (require 'mailcap nil t)
+ (mailcap-file-default-commands files))))
(if (listp minibuffer-default)
(append minibuffer-default commands)
(cons minibuffer-default commands))))
@@ -638,6 +639,7 @@ This normally reads using `read-shell-command', but if the
offer a smarter default choice of shell command."
(minibuffer-with-setup-hook
(lambda ()
+ (set (make-local-variable 'minibuffer-completion-table) files)
(set (make-local-variable 'minibuffer-default-add-function)
'minibuffer-default-add-dired-shell-commands))
(setq prompt (format prompt (dired-mark-prompt arg files)))