aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJohn Wiegley2001-05-10 03:29:36 +0000
committerJohn Wiegley2001-05-10 03:29:36 +0000
commit5aec6b055cb6b4b57386c484e4dc00cd9fe8a9f1 (patch)
tree3756ff04a23b779e2d79fdf866f6a8f51f32ed83 /lisp/eshell
parent8634b66adade09d77093bbacba3d35a84d47e029 (diff)
downloademacs-5aec6b055cb6b4b57386c484e4dc00cd9fe8a9f1.tar.gz
emacs-5aec6b055cb6b4b57386c484e4dc00cd9fe8a9f1.zip
(eshell-lisp-command): Before calling a Lisp function, convert any
string arguments that have been tagged as "numbers", by calling string-to-number.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-cmd.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 0b5cf0c8d26..fee5ea0c3c3 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1383,6 +1383,16 @@ messages, and errors."
1383 1383
1384(defun eshell-lisp-command (object &optional args) 1384(defun eshell-lisp-command (object &optional args)
1385 "Insert Lisp OBJECT, using ARGS if a function." 1385 "Insert Lisp OBJECT, using ARGS if a function."
1386 ;; if any of the arguments are flagged as numbers waiting for
1387 ;; conversion, convert them now
1388 (let ((a args) arg)
1389 (while a
1390 (setq arg (car a))
1391 (if (and (stringp arg)
1392 (> (length arg) 0)
1393 (get-text-property 0 'number arg))
1394 (setcar a (string-to-number arg)))
1395 (setq a (cdr a))))
1386 (setq eshell-last-arguments args 1396 (setq eshell-last-arguments args
1387 eshell-last-command-name "#<Lisp>") 1397 eshell-last-command-name "#<Lisp>")
1388 (catch 'eshell-external ; deferred to an external command 1398 (catch 'eshell-external ; deferred to an external command