aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-01-31 15:07:40 +0000
committerLuc Teirlinck2004-01-31 15:07:40 +0000
commit11178a06065ec6bd4d656899cea42c036d3798fb (patch)
tree8dcf3c972f9aea408dffff6f5f75dfe13a7456e0
parenteb9961012524602971796500bee6a27dd11938ae (diff)
downloademacs-11178a06065ec6bd4d656899cea42c036d3798fb.tar.gz
emacs-11178a06065ec6bd4d656899cea42c036d3798fb.zip
(edit-and-eval-command): Bind print-level and
minibuffer-history-sexp-flag around call to read-from-minibuffer. Correct initial position in command-history.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/simple.el20
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e76416e8483..c5a5ffe16ae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12004-01-31 Luc Teirlinck <teirllm@auburn.edu>
2
3 * simple.el (edit-and-eval-command): Bind print-level and
4 minibuffer-history-sexp-flag around call to read-from-minibuffer.
5 Correct initial position in command-history.
6
12004-01-30 Luc Teirlinck <teirllm@auburn.edu> 72004-01-30 Luc Teirlinck <teirllm@auburn.edu>
2 8
3 * files.el (read-directory-name): Adapt the docstring to recent 9 * 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."
678COMMAND is a Lisp expression. Let user edit that expression in 678COMMAND is a Lisp expression. Let user edit that expression in
679the minibuffer, then read and evaluate the result." 679the minibuffer, then read and evaluate the result."
680 (let ((command 680 (let ((command
681 (unwind-protect 681 (let ((print-level nil)
682 (read-from-minibuffer prompt 682 (minibuffer-history-sexp-flag (1+ (minibuffer-depth))))
683 (prin1-to-string command) 683 (unwind-protect
684 read-expression-map t 684 (read-from-minibuffer prompt
685 '(command-history . 1)) 685 (prin1-to-string command)
686 ;; If command was added to command-history as a string, 686 read-expression-map t
687 ;; get rid of that. We want only evaluable expressions there. 687 'command-history)
688 (if (stringp (car command-history)) 688 ;; If command was added to command-history as a string,
689 (setq command-history (cdr command-history)))))) 689 ;; get rid of that. We want only evaluable expressions there.
690 (if (stringp (car command-history))
691 (setq command-history (cdr command-history)))))))
690 692
691 ;; If command to be redone does not match front of history, 693 ;; If command to be redone does not match front of history,
692 ;; add it to the history. 694 ;; add it to the history.