From: Lars Ingebrigtsen Date: Wed, 21 Jul 2021 11:12:05 +0000 (+0200) Subject: Restore evaluation logic in dired-guess-default X-Git-Tag: emacs-28.0.90~1773 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e385eb49dbf4f3ccf68a6670e245a309e4393c4;p=emacs.git Restore evaluation logic in dired-guess-default * lisp/dired-x.el (dired-guess-default): Restore the `eval' bits also removed in a previous commit (bug#48071). --- diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 073923e09c9..a7bfae759ed 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -975,17 +975,20 @@ See `dired-guess-shell-alist-user'." (let* ((case-fold-search dired-guess-shell-case-fold-search) (programs (delete-dups - (seq-reduce - #'append - (mapcar #'cdr - (seq-filter (lambda (elem) - (seq-every-p - (lambda (file) - (string-match-p (car elem) file)) - files)) - (append dired-guess-shell-alist-user - dired-guess-shell-alist-default))) - nil)))) + (mapcar + (lambda (command) + (eval command `((file . ,(car files))))) + (seq-reduce + #'append + (mapcar #'cdr + (seq-filter (lambda (elem) + (seq-every-p + (lambda (file) + (string-match-p (car elem) file)) + files)) + (append dired-guess-shell-alist-user + dired-guess-shell-alist-default))) + nil))))) (if (length= programs 1) (car programs) programs)))