From 5d6c83ae15fc2f4743e073e0f55d9ff48a3ee725 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 20 Oct 1994 20:14:45 +0000 Subject: [PATCH] (edit-and-eval-command): Elements of command-history are forms, not strings. --- lisp/simple.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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." (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) -- 2.39.5