Variable: compile-command
compile-command is a customizable variable defined in compile.el.gz.
Value
"make -k "
Documentation
Last shell command used to do a compilation; default for next compilation.
Sometimes it is useful for files to supply local values for this variable. You might also use mode hooks to specify it in certain modes, like this:
(add-hook 'c-mode-hook
(lambda ()
(unless (or (file-exists-p "makefile")
(file-exists-p "Makefile"))
(setq-local compile-command
(concat "make -k "
(if buffer-file-name
(shell-quote-argument
(file-name-sans-extension buffer-file-name))))))))
It's often useful to leave a space at the end of the value.
Probably introduced at or before Emacs version 24.4.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
;;;###autoload
(defcustom compile-command "make -k "
"Last shell command used to do a compilation; default for next compilation.
Sometimes it is useful for files to supply local values for this variable.
You might also use mode hooks to specify it in certain modes, like this:
(add-hook \\='c-mode-hook
(lambda ()
(unless (or (file-exists-p \"makefile\")
(file-exists-p \"Makefile\"))
(setq-local compile-command
(concat \"make -k \"
(if buffer-file-name
(shell-quote-argument
(file-name-sans-extension buffer-file-name))))))))
It's often useful to leave a space at the end of the value."
:type 'string)