From: Luc Teirlinck Date: Sat, 31 Jan 2004 15:07:40 +0000 (+0000) Subject: (edit-and-eval-command): Bind print-level and X-Git-Tag: ttn-vms-21-2-B4~7780 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11178a06065ec6bd4d656899cea42c036d3798fb;p=emacs.git (edit-and-eval-command): Bind print-level and minibuffer-history-sexp-flag around call to read-from-minibuffer. Correct initial position in command-history. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e76416e8483..c5a5ffe16ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-01-31 Luc Teirlinck + + * simple.el (edit-and-eval-command): Bind print-level and + minibuffer-history-sexp-flag around call to read-from-minibuffer. + Correct initial position in command-history. + 2004-01-30 Luc Teirlinck * files.el (read-directory-name): Adapt the docstring to recent diff --git a/lisp/simple.el b/lisp/simple.el index 3d2be573012..23d5e2c3440 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -678,15 +678,17 @@ the echo area." COMMAND is a Lisp expression. Let user edit that expression in the minibuffer, then read and evaluate the result." (let ((command - (unwind-protect - (read-from-minibuffer prompt - (prin1-to-string command) - read-expression-map t - '(command-history . 1)) - ;; If command was added to command-history as a string, - ;; get rid of that. We want only evaluable expressions there. - (if (stringp (car command-history)) - (setq command-history (cdr command-history)))))) + (let ((print-level nil) + (minibuffer-history-sexp-flag (1+ (minibuffer-depth)))) + (unwind-protect + (read-from-minibuffer prompt + (prin1-to-string command) + read-expression-map t + 'command-history) + ;; If command was added to command-history as a string, + ;; get rid of that. We want only evaluable expressions there. + (if (stringp (car command-history)) + (setq command-history (cdr command-history))))))) ;; If command to be redone does not match front of history, ;; add it to the history.