Home / Emacs / Compilation / Configuration
Add completion support
(with-eval-after-load 'compile
(defun my-compilation-read-command (command)
(completing-read "Compile command: " compile-history
nil nil nil
(if (equal (car compile-history) command)
'(compile-history . 1)
'compile-history)
command)))
(with-eval-after-load 'compile
(advice-add #'compilation-read-command
:override
#'my-compilation-read-command))
Based on the idea in Issue 531.