[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24723: 26.0.50; minibuffer-default-add-shell-commands wrong behavior
From: |
Mark Oteiza |
Subject: |
bug#24723: 26.0.50; minibuffer-default-add-shell-commands wrong behavior |
Date: |
Tue, 18 Oct 2016 20:29:37 -0400 |
User-agent: |
Mutt/1.7+23 (87911ba95dae) (2016-08-17) |
I'm inclined to push the following:
diff --git a/lisp/simple.el b/lisp/simple.el
index 70bd759..67ab8ca 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3169,7 +3169,9 @@ minibuffer-default-add-shell-commands
(let* ((filename (if (listp minibuffer-default)
(car minibuffer-default)
minibuffer-default))
- (commands (and filename (require 'mailcap nil t)
+ ;; The default minibuffer value is not always a filename (Bug#24723)
+ (commands (and filename (file-readable-p filename)
+ (require 'mailcap nil t)
(mailcap-file-default-commands (list filename)))))
(setq commands (mapcar (lambda (command)
(concat command " " filename))