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:
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."
|
||||
(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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue