Mercurial > emacs
changeset 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 | 4705869d065e |
children | 9d4e23982c26 |
files | lisp/progmodes/compile.el |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
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))