aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-10-20 20:14:45 +0000
committerKarl Heuer1994-10-20 20:14:45 +0000
commit5d6c83ae15fc2f4743e073e0f55d9ff48a3ee725 (patch)
tree09e88787832e68c55e11beb89acd7e0d91470e31
parent7ee9eab9d72a24c5742c933c6b5f0af742eae253 (diff)
downloademacs-5d6c83ae15fc2f4743e073e0f55d9ff48a3ee725.tar.gz
emacs-5d6c83ae15fc2f4743e073e0f55d9ff48a3ee725.zip
(edit-and-eval-command): Elements of command-history are forms, not strings.
-rw-r--r--lisp/simple.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 090542e3cac..abf1020d21a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -404,6 +404,15 @@ the minibuffer, then read and evaluate the result."
404 (prin1-to-string command) 404 (prin1-to-string command)
405 read-expression-map t 405 read-expression-map t
406 '(command-history . 1)))) 406 '(command-history . 1))))
407 ;; If command was added to command-history as a string,
408 ;; get rid of that. We want only evallable expressions there.
409 (if (stringp (car command-history))
410 (setq command-history (cdr command-history)))
411
412 ;; If command to be redone does not match front of history,
413 ;; add it to the history.
414 (or (equal command (car command-history))
415 (setq command-history (cons command command-history)))
407 (eval command))) 416 (eval command)))
408 417
409(defun repeat-complex-command (arg) 418(defun repeat-complex-command (arg)