diff options
| author | Richard M. Stallman <rms@gnu.org> | 1992-07-24 06:09:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1992-07-24 06:09:27 +0000 |
| commit | ba343182c20416a0cce986585f4382efc753205e (patch) | |
| tree | 4ebb02937ec70e332f65082d1816324fac275a1a /lisp/simple.el | |
| parent | e6dfdce5163f8de5b0acb804d94e7b81f609cf90 (diff) | |
| download | emacs-ba343182c20416a0cce986585f4382efc753205e.tar.gz | |
*** empty log message ***
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index ce91a7840b7..59211c9db20 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -353,8 +353,9 @@ the minibuffer, then read and evaluate the result." ;; (defvar repeat-complex-command nil) (defvar minibuffer-history nil) -(defvar minibuffer-history-variable 'minibuffer-history) -(defvar minibuffer-history-position nil) +(defvar minibuffer-history-sexp-flag nil) +(setq minibuffer-history-variable 'minibuffer-history) +(setq minibuffer-history-position nil) (define-key minibuffer-local-map "\en" 'next-history-element) (define-key minibuffer-local-ns-map "\en" 'next-history-element) @@ -380,8 +381,9 @@ it is added to the front of the command history. Whilst editing the command, the following commands are available: \\{repeat-complex-command-map}" (interactive "p") - (let ((elt (nth (1- repeat-complex-command-arg) command-history)) + (let ((elt (nth (1- arg) command-history)) (minibuffer-history-position arg) + (minibuffer-history-sexp-flag t) (repeat-complex-command-flag t) newcmd) (if elt @@ -408,8 +410,12 @@ Whilst editing the command, the following commands are available: "No preceding item in minibuffer history")) (erase-buffer) (setq minibuffer-history-position narg) - (insert (prin1-to-string (nth (1- minibuffer-history-position) - (symbol-value minibuffer-history-variable)))) + (let ((elt (nth (1- minibuffer-history-position) + (symbol-value minibuffer-history-variable)))) + (insert + (if minibuffer-history-sexp-flag + (prin1-to-string elt) + elt)))) (goto-char (point-min))))) (defun previous-history-element (n) |
