emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 27c1949: Handle integer indices for eshell variable


From: Noam Postavsky
Subject: [Emacs-diffs] master 27c1949: Handle integer indices for eshell variables (Bug#26055)
Date: Sat, 17 Jun 2017 00:15:00 -0400 (EDT)

branch: master
commit 27c194995b460b79e8e62e0d21e85d87df664649
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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.
---
 lisp/eshell/esh-var.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index fe1f118..cdd05bd 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]