# HG changeset patch # User Karl Heuer # Date 782684085 0 # Node ID 53e092e189c639fd85ea23cbdb21a95724db2a62 # Parent d325ca3a67e47f668068e0ba2441a80cfc2e37b7 (edit-and-eval-command): Elements of command-history are forms, not strings. diff -r d325ca3a67e4 -r 53e092e189c6 lisp/simple.el --- a/lisp/simple.el Thu Oct 20 20:10:29 1994 +0000 +++ b/lisp/simple.el Thu Oct 20 20:14:45 1994 +0000 @@ -404,6 +404,15 @@ (prin1-to-string command) read-expression-map t '(command-history . 1)))) + ;; 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 command (car command-history)) + (setq command-history (cons command command-history))) (eval command))) (defun repeat-complex-command (arg)