1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 12:40:56 -08:00

(compile): Don't overwrite last command in minibuffer history

with default command if they are not equal.
This commit is contained in:
Juri Linkov 2004-11-08 12:19:14 +00:00
parent b056d9cbd7
commit 20320c6516

View file

@ -785,11 +785,14 @@ the function in `compilation-buffer-name-function', so you can set that
to a function that generates a unique name." to a function that generates a unique name."
(interactive (interactive
(list (list
(if (or compilation-read-command current-prefix-arg) (let ((command (eval compile-command)))
(read-from-minibuffer "Compile command: " (if (or compilation-read-command current-prefix-arg)
(eval compile-command) nil nil (read-from-minibuffer "Compile command: "
'(compile-history . 1)) command nil nil
(eval compile-command)) (if (equal (car compile-history) command)
'(compile-history . 1)
'compile-history))
command))
(consp current-prefix-arg))) (consp current-prefix-arg)))
(unless (equal command (eval compile-command)) (unless (equal command (eval compile-command))
(setq compile-command command)) (setq compile-command command))