diff options
| author | Luc Teirlinck | 2004-01-31 15:07:40 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-01-31 15:07:40 +0000 |
| commit | 11178a06065ec6bd4d656899cea42c036d3798fb (patch) | |
| tree | 8dcf3c972f9aea408dffff6f5f75dfe13a7456e0 | |
| parent | eb9961012524602971796500bee6a27dd11938ae (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/simple.el | 20 |
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 @@ | |||
| 1 | 2004-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 | |||
| 1 | 2004-01-30 Luc Teirlinck <teirllm@auburn.edu> | 7 | 2004-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." | |||
| 678 | COMMAND is a Lisp expression. Let user edit that expression in | 678 | COMMAND is a Lisp expression. Let user edit that expression in |
| 679 | the minibuffer, then read and evaluate the result." | 679 | the 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. |