From db16f109c931e0c0d4c2d995032bf5f2896ffaec Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 23 Nov 1993 11:03:16 +0000 Subject: [PATCH] (repeat-complex-command): Undo Oct 2 change. --- lisp/simple.el | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 2cb169e6f18..e6a24cb49a1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -420,18 +420,15 @@ to get different commands to edit and resubmit." "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)))) -- 2.39.5