summaryrefslogtreecommitdiff
path: root/lisp/eshell/esh-ext.el
diff options
context:
space:
mode:
authorJim Porter <jporterbugs@gmail.com>2022-09-25 21:47:26 -0700
committerJim Porter <jporterbugs@gmail.com>2022-10-17 18:48:52 -0700
commit7c41016fca5ab0638f1e2fed260e2ee41f3400c2 (patch)
tree11fe29e20ed60074578e2f2f10d47ed8bd65d404 /lisp/eshell/esh-ext.el
parentf1caa10f04c980034f5ee6e0748cf3b03f460b2b (diff)
downloademacs-7c41016fca5ab0638f1e2fed260e2ee41f3400c2.tar.gz
emacs-7c41016fca5ab0638f1e2fed260e2ee41f3400c2.tar.bz2
emacs-7c41016fca5ab0638f1e2fed260e2ee41f3400c2.zip
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.
Diffstat (limited to 'lisp/eshell/esh-ext.el')
0 files changed, 0 insertions, 0 deletions