Mercurial > emacs
changeset 9629:53e092e189c6
(edit-and-eval-command): Elements of command-history are forms, not strings.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Oct 1994 20:14:45 +0000 |
parents | d325ca3a67e4 |
children | 5410efcb7b6e |
files | lisp/simple.el |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)