Rudy’s OBTF Rudolf Adamkovič

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.


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.