# HG changeset patch # User John Wiegley # Date 989465376 0 # Node ID 4dc446a29001df0c28d3f9b33d1daf6349ac1a14 # Parent e108dfe2ea997c62e1cf68e93e2f0f5fdc202c8f (eshell-lisp-command): Before calling a Lisp function, convert any string arguments that have been tagged as "numbers", by calling string-to-number. diff -r e108dfe2ea99 -r 4dc446a29001 lisp/eshell/esh-cmd.el --- a/lisp/eshell/esh-cmd.el Thu May 10 03:29:19 2001 +0000 +++ b/lisp/eshell/esh-cmd.el Thu May 10 03:29:36 2001 +0000 @@ -1383,6 +1383,16 @@ (defun eshell-lisp-command (object &optional args) "Insert Lisp OBJECT, using ARGS if a function." + ;; if any of the arguments are flagged as numbers waiting for + ;; conversion, convert them now + (let ((a args) arg) + (while a + (setq arg (car a)) + (if (and (stringp arg) + (> (length arg) 0) + (get-text-property 0 'number arg)) + (setcar a (string-to-number arg))) + (setq a (cdr a)))) (setq eshell-last-arguments args eshell-last-command-name "#") (catch 'eshell-external ; deferred to an external command