summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorJim Porter <jporterbugs@gmail.com>2023-01-20 13:54:20 -0800
committerJim Porter <jporterbugs@gmail.com>2023-01-27 18:03:10 -0800
commitdabe0b7d40778496ecb308f54999248ea286d89b (patch)
treea51119134da0ea2332b82d94bb3d8401252d530c /lisp/emacs-lisp/bytecomp.el
parent4287d56bad5201cf0946526bb0e27c17426bd969 (diff)
downloademacs-dabe0b7d40778496ecb308f54999248ea286d89b.tar.gz
emacs-dabe0b7d40778496ecb308f54999248ea286d89b.tar.bz2
emacs-dabe0b7d40778496ecb308f54999248ea286d89b.zip
Add support for negative indices and index ranges in Eshell
* lisp/eshell/esh-util.el (eshell-integer-regexp): New defvar. * lisp/eshell/esh-var.el (eshell-parse-indices): Expand docstring. (eshell-parse-index): New function. (eshell-apply-indices): Use 'eshell-parse-index' to determine whether to treat the first index as a regexp. Simplify the implementation a bit. (eshell-index-range): New pcase macro... (eshell-index-value): ... use it, and restructure the implementation. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-indices): New function... (esh-var-test/interp-var-indices/list) (esh-var-test/interp-var-indices/vector) (esh-var-test/interp-var-indices/ring) (esh-var-test/interp-var-indices/split): ... use it. (esh-var-test/interp-var-string-split-indices) (esh-var-test/interp-var-regexp-split-indices) (esh-var-test/interp-var-assoc): Expand tests to cover things that look like numbers or ranges, but aren't. * doc/misc/eshell.texi (Variables): Describe how to get all arguments of the last command. (Dollars Expansion): Explain negative indices and index ranges. (Bugs and ideas): Remove now-implemented ideas. * etc/NEWS: Announce this change.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
0 files changed, 0 insertions, 0 deletions