1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
emacs/doc
Jim Porter 43d5b7a04c Lazily convert numeric strings to Lisp numbers in Eshell
This should reduce the number of issues with Eshell converting strings
to numbers too aggressively and losing information (e.g. "001" -> 1)
while still allowing almost all of the beneficial uses, like summing a
list of numeric strings with '+'.

* lisp/eshell/esh-util.el (eshell--do-mark-numeric-string): New
function.
(eshell-convert-to-number): Make obsolete in favor of...
(eshell-mark-numeric-string): ... this.  Update callers.

* lisp/eshell/esh-arg.el (eshell--numberlike-p): New function...
(eshell-concat-1): ... use it.

* test/lisp/eshell/esh-util-tests.el:  Reimplement type conversion tests
to use 'eshell-convertible-to-number-p' instead.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-var-splice-concat, esh-var-test/interp-concat-cmd)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-split-indices): Adjust tests to check
the new behavior.

* doc/misc/eshell.texi (Type Conversion): New section.
(Expansion): Clarify concatenation behavior.
2024-10-19 12:01:10 -07:00
..
emacs Merge from origin/emacs-30 2024-10-18 17:56:15 +02:00
lispintro Update FSF's address 2024-09-02 21:02:09 +02:00
lispref Merge from origin/emacs-30 2024-10-18 17:56:15 +02:00
man New command-line options for 'etags' 2024-10-08 15:39:33 +03:00
misc Lazily convert numeric strings to Lisp numbers in Eshell 2024-10-19 12:01:10 -07:00
translations ; Fix typos 2024-06-07 23:51:18 +02:00