From 1f32ff090abfdabe09c5ce1cd3ff31167038729e Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 9 Nov 2025 19:49:29 +0200 Subject: [PATCH] * lisp/simple.el (minibuffer-default-add-shell-commands): Fix old bug. Don't treat the first element of the list of commands as a file name. --- lisp/simple.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)))))