Mercurial > emacs
diff lisp/simple.el @ 862:46630543d659
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 24 Jul 1992 06:09:27 +0000 |
parents | 5f325fbc093d |
children | fe5f6b7c9727 |
line wrap: on
line diff
--- a/lisp/simple.el Fri Jul 24 05:00:23 1992 +0000 +++ b/lisp/simple.el Fri Jul 24 06:09:27 1992 +0000 @@ -353,8 +353,9 @@ ;; (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 @@ 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 @@ "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)