; Fix previous commit
authorMark Oteiza <mvoteiza@udel.edu>
Sun, 6 Aug 2017 14:15:17 +0000 (10:15 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Sun, 6 Aug 2017 14:15:17 +0000 (10:15 -0400)
The mailcap minibuffer completion used dynamic binding.  Locally set
a dynamic variable.
* lisp/dired-aux.el: Store list of files in
`minibuffer-completion-table'.

lisp/dired-aux.el

index 0a8ec26f7cad2ccf4899e1941695df2b2d942b7b..2b89e527c30bb6e2e723d9d3208c2e02cc43c1bc 100644 (file)
@@ -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)))