diff options
author | Jim Porter <jporterbugs@gmail.com> | 2022-11-08 22:49:23 -0800 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2022-12-15 21:41:03 -0800 |
commit | e63ef66c57ee74b24998a16b34949f67bbb73d8d (patch) | |
tree | d41fe6c0405a02f78f025284a245e1c4735a6a1b /test/lisp/emacs-lisp | |
parent | 66ac920b0c233e472c7f54d108503dfe9236d3c0 (diff) | |
download | emacs-e63ef66c57ee74b24998a16b34949f67bbb73d8d.tar.gz emacs-e63ef66c57ee74b24998a16b34949f67bbb73d8d.tar.bz2 emacs-e63ef66c57ee74b24998a16b34949f67bbb73d8d.zip |
Add support for the "splice operator" in Eshell
This allows splicing lists in-place in argument lists, which is
particularly important when defining aliases using the '$*' special
variable (bug#59960).
* lisp/eshell/esh-var.el (eshell-parse-variable): Add support for the
splice operator.
(eshell-interpolate-variable): Let 'eshell-parse-variable' handle
adding 'eshell-escape-arg'.
(eshell-complete-variable-reference): Handle the splice operator.
* lisp/eshell/esh-arg.el (eshell-concat-groups)
(eshell-prepare-splice): New functions...
(eshell-resolve-current-argument): ... use them.
(eshell-splice-args): New function.
* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Handle
'eshell-splice-args'.
* lisp/eshell/esh-util.el (eshell-list-to-string): New function...
(eshell-flatten-and-stringify): ... use it.
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Remove
'eshell-splice-args' sigils in Eshell command forms so that we can
perform completion on splice-expansions.
* lisp/eshell/em-unix.el (eshell-complete-host-reference): Don't try
to complete arguments containing "$@".
* test/lisp/eshell/esh-var-tets.el (esh-var-test/interp-list-var)
(esh-var-test/interp-list-var-concat, esh-var-test/interp-var-splice)
(esh-var-test/interp-var-splice-concat)
(esh-var-test/quoted-interp-list-var)
(esh-var-test/quoted-interp-list-var-concat)
(esh-var-test/quoted-interp-var-splice)
(esh-var-test/quoted-interp-var-splice-concat): New tests.
* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-all-args-var-splice): New test.
* doc/misc/eshell.texi (Dollars Expansion): Explain the splice
operator.
(Aliases): Expand documentation and use '$@*'.
(Built-ins, Bugs and Ideas): Use '$@*' where appropriate.
* etc/NEWS: Announce this change.
Diffstat (limited to 'test/lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions