diff --git a/lisp/simple.el b/lisp/simple.el index 8d7237e58c6..fdf8b79444d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4317,8 +4317,7 @@ stdout will be intermixed in the output stream.") This function is used to add all related commands retrieved by `shell-command-guess' to the end of the list of defaults just after the default value." - (let* ((filename (if (listp minibuffer-default) - (car minibuffer-default) + (let* ((filename (unless (consp minibuffer-default) minibuffer-default)) (commands (and filename (require 'dired-aux) (shell-command-guess (list filename)))))