From 5aec6b055cb6b4b57386c484e4dc00cd9fe8a9f1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 10 May 2001 03:29:36 +0000 Subject: [PATCH] (eshell-lisp-command): Before calling a Lisp function, convert any string arguments that have been tagged as "numbers", by calling string-to-number. --- lisp/eshell/esh-cmd.el | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.2