Variable: compilation-save-buffers-predicate
compilation-save-buffers-predicate is a customizable variable defined
in compile.el.gz.
Value
nil
Documentation
The second argument (PRED) passed to save-some-buffers before compiling.
E.g., one can set this to
(lambda ()
(string-prefix-p my-compilation-root (file-truename (buffer-file-name))))
to limit saving to files located under my-compilation-root.
Note, that, in general, compilation-directory cannot be used instead
of my-compilation-root here.
This variable was added, or its default value changed, in Emacs 24.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
(defcustom compilation-save-buffers-predicate nil
"The second argument (PRED) passed to `save-some-buffers' before compiling.
E.g., one can set this to
(lambda ()
(string-prefix-p my-compilation-root (file-truename (buffer-file-name))))
to limit saving to files located under `my-compilation-root'.
Note, that, in general, `compilation-directory' cannot be used instead
of `my-compilation-root' here."
:type '(choice
(const :tag "Default (save all file-visiting buffers)" nil)
(const :tag "Save all buffers" t)
function)
:version "24.1")