# HG changeset patch # User Juri Linkov # Date 1099916354 0 # Node ID 65d3c6f2616242bde2e8d00f6ae0ed9e901294a0 # Parent 4705869d065e285cb0b47f24b407f0a9ed199d02 (compile): Don't overwrite last command in minibuffer history with default command if they are not equal. diff -r 4705869d065e -r 65d3c6f26162 lisp/progmodes/compile.el --- 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))