From: John Wiegley Date: Thu, 10 May 2001 03:29:36 +0000 (+0000) Subject: (eshell-lisp-command): Before calling a Lisp function, convert any X-Git-Tag: emacs-pretest-21.0.104~560 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5aec6b055cb6b4b57386c484e4dc00cd9fe8a9f1;p=emacs.git (eshell-lisp-command): Before calling a Lisp function, convert any string arguments that have been tagged as "numbers", by calling string-to-number. --- 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." (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