1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-26 09:51:31 -08:00
emacs/lisp/eshell
Jim Porter 7c41016fca Allow setting the values of variable aliases in Eshell
This makes commands like "COLUMNS=40 some-command" work as expected.

* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings): Remove
'process-environment' from here...

* lisp/eshell/esh-var.el (eshell-var-initialize): ... and add to here,
along with 'eshell-variable-aliases-list'.
(eshell-inside-emacs): Convert to a 'defvar-local' to make it settable
in a particular Eshell buffer.
(eshell-variable-aliases-list): Make $?, $$, and $* read-only and
update docstring.
(eshell-set-variable): New function...
(eshell-handle-local-variables, eshell/export, eshell/unset): ... use
it.
(eshell/set, pcomplete/eshell-mode/set): New functions.
(eshell-get-variable): Get the variable alias's getter function when
appropriate and use a safer method for checking function arity.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/set/env-var)
(esh-var-test/set/symbol, esh-var-test/unset/env-var)
(esh-var-test/unset/symbol, esh-var-test/setq, esh-var-test/export)
(esh-var-test/local-variables, esh-var-test/alias/function)
(esh-var-test/alias/function-pair, esh-var-test/alias/string)
(esh-var-test/alias/string/prefer-lisp, esh-var-test/alias/symbol)
(esh-var-test/alias/symbol-pair, esh-var-test/alias/export)
(esh-var-test/alias/local-variables): New tests.

* doc/misc/eshell.texi (Built-ins): Add 'set' and update 'unset'
documentation.
(Variables): Expand documentation of how to get/set variables.
2022-10-17 18:48:52 -07:00
..
em-alias.el
em-banner.el
em-basic.el
em-cmpl.el
em-dirs.el
em-elecslash.el
em-extpipe.el
em-glob.el
em-hist.el
em-ls.el
em-pred.el
em-prompt.el
em-rebind.el
em-script.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
em-smart.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
em-term.el
em-tramp.el
em-unix.el Rename file-attribute-file-number' to file-attribute-file-identifier' 2022-10-14 21:32:15 +02:00
em-xtra.el
esh-arg.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
esh-cmd.el Allow setting the values of variable aliases in Eshell 2022-10-17 18:48:52 -07:00
esh-ext.el
esh-io.el
esh-mode.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
esh-module.el
esh-opt.el
esh-proc.el Fix encoding and decoding of process I/O in Eshell on Windows 2022-10-15 13:59:49 +03:00
esh-util.el
esh-var.el Allow setting the values of variable aliases in Eshell 2022-10-17 18:48:52 -07:00
eshell.el