1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add new Eshell built-in command 'funcall'

* lisp/eshell/esh-cmd.el (eshell/funcall): New function...

* test/lisp/eshell/em-glob-tests.el (em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-lisp-indices)
(esh-var-test/quoted-interp-cmd-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-result-var-split-indices)
(esh-var-test/last-arg-var-split-indices): ... use it in tests.

* doc/misc/eshell.texi (List of Built-ins): Describe this command.
This commit is contained in:
Jim Porter 2024-05-16 20:33:18 -07:00
parent 113bd2082c
commit 2f7d011d18
4 changed files with 48 additions and 29 deletions

View file

@ -1480,6 +1480,14 @@ Print the result using `eshell-printn'; if an error occurs, print it
via `eshell-errorn'."
(eshell-eval* #'eshell-printn #'eshell-errorn form))
(defun eshell/funcall (func &rest args)
"Eshell built-in command for `funcall' (which see).
This simply calls FUNC with the specified ARGS. FUNC may be a symbol or
a string naming a Lisp function."
(when (stringp func)
(setq func (intern func)))
(apply func args))
(defvar eshell-last-output-end) ;Defined in esh-mode.el.
(defun eshell-lisp-command (object &optional args)