Commit 5e385eb4 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

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).
parent bc0aca05
Pipeline #11513 failed with stages
in 1 minute and 8 seconds
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment