1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 02:50:26 -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."
(interactive
(list
(let ((command (eval compile-command)))
(if (or compilation-read-command current-prefix-arg)
(read-from-minibuffer "Compile command: "
(eval compile-command) nil nil
'(compile-history . 1))
(eval 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))