Mercurial > emacs
diff lisp/progmodes/compile.el @ 58031:65d3c6f26162
(compile): Don't overwrite last command in minibuffer history
with default command if they are not equal.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Mon, 08 Nov 2004 12:19:14 +0000 |
parents | 9621341c0037 |
children | d7757127f475 cb7f41387eb3 |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Mon Nov 08 12:18:33 2004 +0000 +++ b/lisp/progmodes/compile.el Mon Nov 08 12:19:14 2004 +0000 @@ -785,11 +785,14 @@ to a function that generates a unique name." (interactive (list - (if (or compilation-read-command current-prefix-arg) - (read-from-minibuffer "Compile command: " - (eval compile-command) nil nil - '(compile-history . 1)) - (eval compile-command)) + (let ((command (eval compile-command))) + (if (or compilation-read-command current-prefix-arg) + (read-from-minibuffer "Compile command: " + command nil nil + (if (equal (car compile-history) command) + '(compile-history . 1) + 'compile-history)) + command)) (consp current-prefix-arg))) (unless (equal command (eval compile-command)) (setq compile-command command))