Fix evaluation of negated argument predicates in Eshell
* lisp/eshell/em-pred.el (eshell-add-pred-func): Let-bind 'pred' so the lambdas see the original value (bug#54369).
This commit is contained in:
parent
edb8481ce1
commit
ea3c147d2d
1 changed files with 6 additions and 6 deletions
|
@ -360,12 +360,12 @@ resultant list of strings."
|
|||
|
||||
(defun eshell-add-pred-func (pred funcs negate follow)
|
||||
"Add the predicate function PRED to FUNCS."
|
||||
(if negate
|
||||
(setq pred (lambda (file)
|
||||
(not (funcall pred file)))))
|
||||
(if follow
|
||||
(setq pred (lambda (file)
|
||||
(funcall pred (file-truename file)))))
|
||||
(when negate
|
||||
(setq pred (let ((pred pred))
|
||||
(lambda (file) (not (funcall pred file))))))
|
||||
(when follow
|
||||
(setq pred (let ((pred pred))
|
||||
(lambda (file) (funcall pred (file-truename file))))))
|
||||
(cons pred funcs))
|
||||
|
||||
(defun eshell-pred-user-or-group (mod-char mod-type attr-index get-id-func)
|
||||
|
|
Loading…
Add table
Reference in a new issue