changeset 53767:6cac586a9c3d

(edit-and-eval-command): Bind print-level and minibuffer-history-sexp-flag around call to read-from-minibuffer. Correct initial position in command-history.
author Luc Teirlinck <teirllm@auburn.edu>
date Sat, 31 Jan 2004 15:05:25 +0000
parents ec7e8552309c
children ea873052028a
files lisp/simple.el
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat Jan 31 04:41:35 2004 +0000
+++ b/lisp/simple.el	Sat Jan 31 15:05:25 2004 +0000
@@ -678,15 +678,17 @@
 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.