Function: eshell-apply-modifiers
eshell-apply-modifiers is a byte-compiled function defined in
em-pred.el.gz.
Signature
(eshell-apply-modifiers LST PREDICATES MODIFIERS STRING-DESC)
Documentation
Apply to list LST a series of PREDICATES and MODIFIERS.
STRING-DESC is the original string defining these predicates and modifiers.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-pred.el.gz
(defun eshell-apply-modifiers (lst predicates modifiers string-desc)
"Apply to list LST a series of PREDICATES and MODIFIERS.
STRING-DESC is the original string defining these predicates and
modifiers."
(let (stringified)
(if (stringp lst)
(setq lst (list lst)
stringified t))
(when (listp lst)
(when lst
(setq lst (or (eshell-winnow-list lst nil predicates)
(when eshell-error-if-no-glob
(error "No matches found: (%s)" string-desc)))))
(while modifiers
(setq lst (funcall (car modifiers) lst)
modifiers (cdr modifiers)))
(if (and stringified
(= (length lst) 1))
(car lst)
lst))))