mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
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. |
||
|---|---|---|
| .. | ||
| emacs | ||
| lispintro | ||
| lispref | ||
| man | ||
| misc | ||
| translations | ||