]> git.eshelyaron.com Git - emacs.git/commitdiff
(edit-and-eval-command): Bind print-level and
authorLuc Teirlinck <teirllm@auburn.edu>
Sat, 31 Jan 2004 15:07:40 +0000 (15:07 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Sat, 31 Jan 2004 15:07:40 +0000 (15:07 +0000)
minibuffer-history-sexp-flag around call to read-from-minibuffer.
Correct initial position in command-history.

lisp/ChangeLog
lisp/simple.el

index e76416e84834630aa37970f673a0efa39d0fc15b..c5a5ffe16ae1888a6eb89c28db94add35a55709b 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-31  Luc Teirlinck  <teirllm@auburn.edu>
+
+       * 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  <teirllm@auburn.edu>
 
        * files.el (read-directory-name): Adapt the docstring to recent
index 3d2be5730120cc1772aaeb328aab6e9fef576039..23d5e2c344012bec0da7c923f8ad992d46b7aa07 100644 (file)
@@ -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.