]> git.eshelyaron.com Git - emacs.git/commit
Avoid shadowing variables in some Eshell command forms
authorJim Porter <jporterbugs@gmail.com>
Sun, 19 Mar 2023 02:18:28 +0000 (19:18 -0700)
committerJim Porter <jporterbugs@gmail.com>
Sat, 1 Apr 2023 23:24:31 +0000 (16:24 -0700)
commit97e35b149874a105a9975853a7fcd6f0034ddeab
tree5d2193a924799dc93aeec94083755b4a652f7ae4
parent626f2f744104bc14c28456134cf75ff2f16d9901
Avoid shadowing variables in some Eshell command forms

* lisp/eshell/esh-cmd.el (eshell-rewrite-for-command): Make
'for-items' an uninterned symbol.
(eshell-as-subcommand): Correct docstring.
(eshell-do-command-to-value): Mark obsolete.
(eshell-command-to-value): Move binding of 'value' outside of the
macro's result, and remove call to 'eshell-do-command-to-value'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/subcommand-shadow-value)
(esh-cmd-test/for-loop-for-items-shadow): New tests.
(esh-cmd-test/for-name-loop, esh-cmd-test/for-name-shadow-loop):
Rename to...
(esh-cmd-test/for-loop-name, esh-cmd-test/for-loop-name-shadow):
... these.
lisp/eshell/esh-cmd.el
test/lisp/eshell/esh-cmd-tests.el