mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-17 19:30:38 -08:00
(compile): Don't overwrite last command in minibuffer history
with default command if they are not equal.
This commit is contained in:
parent
b056d9cbd7
commit
20320c6516
1 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||||
|
(let ((command (eval compile-command)))
|
||||||
(if (or compilation-read-command current-prefix-arg)
|
(if (or compilation-read-command current-prefix-arg)
|
||||||
(read-from-minibuffer "Compile command: "
|
(read-from-minibuffer "Compile command: "
|
||||||
(eval compile-command) nil nil
|
command nil nil
|
||||||
'(compile-history . 1))
|
(if (equal (car compile-history) command)
|
||||||
(eval compile-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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue