Mercurial > emacs
changeset 5135:b8731641d26a
(repeat-complex-command): Undo Oct 2 change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 23 Nov 1993 11:03:16 +0000 |
parents | 0a4e46e15304 |
children | 500f269bf0a8 |
files | lisp/simple.el |
diffstat | 1 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Nov 23 10:57:16 1993 +0000 +++ b/lisp/simple.el Tue Nov 23 11:03:16 1993 +0000 @@ -420,18 +420,15 @@ "Redo: " (prin1-to-string elt) read-expression-map t (cons 'command-history arg))) -;;; read-from-minibuffer handles the adding of what is read to the history -;;; variable. -;;; -;;; ;; If command was added to command-history as a string, -;;; ;; get rid of that. We want only evallable 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. -;;; (or (equal newcmd (car command-history)) -;;; (setq command-history (cons newcmd command-history))) + ;; If command was added to command-history as a string, + ;; get rid of that. We want only evallable 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. + (or (equal newcmd (car command-history)) + (setq command-history (cons newcmd command-history))) (eval newcmd)) (ding))))