aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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)