mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Handle integer indices for eshell variables (Bug#26055)
* lisp/eshell/esh-var.el (eshell-index-value): Convert index to number if it's been marked as one, just like `eshell-lisp-command' does.
This commit is contained in:
parent
49c0ff29c2
commit
27c194995b
1 changed files with 2 additions and 0 deletions
|
|
@ -563,6 +563,8 @@ For example, to retrieve the second element of a user's record in
|
|||
|
||||
(defun eshell-index-value (value index)
|
||||
"Reference VALUE using the given INDEX."
|
||||
(when (and (stringp index) (get-text-property 0 'number index))
|
||||
(setq index (string-to-number index)))
|
||||
(if (stringp index)
|
||||
(cdr (assoc index value))
|
||||
(cond
|
||||
|
|
|
|||
Loading…
Reference in a new issue