;;;###autoload
(defcustom compilation-mode-hook nil
"List of hook functions run by `compilation-mode'."
- :type 'hook
- :group 'compilation)
+ :type 'hook)
;;;###autoload
(defcustom compilation-start-hook nil
"Hook run after starting a new compilation process.
The hook is run with one argument, the new process."
- :type 'hook
- :group 'compilation)
+ :type 'hook)
;;;###autoload
(defcustom compilation-window-height nil
"Number of lines in a compilation window.
If nil, use Emacs default."
:type '(choice (const :tag "Default" nil)
- integer)
- :group 'compilation)
+ integer))
(defvar compilation-filter-hook nil
"Hook run after `compilation-filter' has inserted a string into the buffer.
"Alist of values for `compilation-error-regexp-alist'.")
(defcustom compilation-error-regexp-alist
- (mapcar 'car compilation-error-regexp-alist-alist)
+ (mapcar #'car compilation-error-regexp-alist-alist)
"Alist that specifies how to match errors in compiler output.
On GNU and Unix, any string is a valid filename, so these
matchers must make some common sense assumptions, which catch
:type '(repeat (choice (symbol :tag "Predefined symbol")
(sexp :tag "Error specification")))
:link `(file-link :tag "example file"
- ,(expand-file-name "compilation.txt" data-directory))
- :group 'compilation)
+ ,(expand-file-name "compilation.txt" data-directory)))
;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp)
(defvar compilation-directory nil
that value, otherwise it uses the value in the *compilation*
buffer. This enables a major-mode to specify its own value."
:type 'boolean
- :group 'compilation
:version "20.4")
(defcustom compilation-read-command t
file might define a malicious `compile-command' as a file local
variable, and you might not notice. Therefore, `compile-command'
is considered unsafe if this variable is nil."
- :type 'boolean
- :group 'compilation)
+ :type 'boolean)
;;;###autoload
(defcustom compilation-ask-about-save t
"Non-nil means \\[compile] asks which buffers to save before compiling.
Otherwise, it saves all modified buffers without asking."
- :type 'boolean
- :group 'compilation)
+ :type 'boolean)
(defcustom compilation-save-buffers-predicate nil
"The second argument (PRED) passed to `save-some-buffers' before compiling.
(const :tag "Default (save all file-visiting buffers)" nil)
(const :tag "Save all buffers" t)
function)
- :group 'compilation
:version "24.1")
;;;###autoload
Elements should be directory names, not file names of directories.
The value nil as an element means to try the default directory."
:type '(repeat (choice (const :tag "Default" nil)
- (string :tag "Directory")))
- :group 'compilation)
+ (string :tag "Directory"))))
;;;###autoload
(defcustom compile-command (purecopy "make -k ")
(file-name-sans-extension buffer-file-name))))))))
It's often useful to leave a space at the end of the value."
- :type 'string
- :group 'compilation)
+ :type 'string)
;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command))))
;;;###autoload
This only affects platforms that support asynchronous processes (see
`start-process'); synchronous compilation processes never accept input."
:type 'boolean
- :group 'compilation
:version "22.1")
;; A weak per-compilation-buffer hash indexed by (FILENAME . DIRECTORY). Each
starting the compilation process."
:type '(repeat (string :tag "ENVVARNAME=VALUE"))
:options '(("LANG=C"))
- :group 'compilation
:version "24.1")
;; History of compile commands.
(defface compilation-error
'((t :inherit error))
"Face used to highlight compiler errors."
- :group 'compilation
:version "22.1")
(defface compilation-warning
'((t :inherit warning))
"Face used to highlight compiler warnings."
- :group 'compilation
:version "22.1")
(defface compilation-info
'((t :inherit success))
"Face used to highlight compiler information."
- :group 'compilation
:version "22.1")
;; The next three faces must be able to stand out against the
(((class color) (min-colors 8)) (:foreground "red"))
(t (:inverse-video t :weight bold)))
"Face for Compilation mode's \"error\" mode line indicator."
- :group 'compilation
:version "24.3")
(defface compilation-mode-line-run
'((t :inherit compilation-warning))
"Face for Compilation mode's \"running\" mode line indicator."
- :group 'compilation
:version "24.3")
(defface compilation-mode-line-exit
(((class color)) (:foreground "green" :weight bold))
(t (:weight bold)))
"Face for Compilation mode's \"exit\" mode line indicator."
- :group 'compilation
:version "24.3")
(defface compilation-line-number
'((t :inherit font-lock-keyword-face))
"Face for displaying line numbers in compiler messages."
- :group 'compilation
:version "22.1")
(defface compilation-column-number
'((t :inherit font-lock-doc-face))
"Face for displaying column numbers in compiler messages."
- :group 'compilation
:version "22.1")
(defcustom compilation-message-face 'underline
`compilation-info-face', `compilation-line-face' and
`compilation-column-face' get prepended to this, when applicable."
:type 'face
- :group 'compilation
:version "22.1")
(defvar compilation-error-face 'compilation-error
(defcustom compilation-auto-jump-to-first-error nil
"If non-nil, automatically jump to the first error during compilation."
:type 'boolean
- :group 'compilation
:version "23.1")
(defvar compilation-auto-jump-to-next nil
:type '(choice (const :tag "Skip warnings and info" 2)
(const :tag "Skip info" 1)
(const :tag "No skip" 0))
- :group 'compilation
:version "22.1")
(defun compilation-set-skip-threshold (level)
to from the current content in the current compilation buffer, even if it was
from a different message."
:type 'boolean
- :group 'compilation
:version "22.1")
(defun compilation-type (type)
(setq command (compilation-read-command (or (car compilation-arguments)
command)))
(if compilation-arguments (setcar compilation-arguments command)))
- (apply 'compilation-start (or compilation-arguments (list command)))))
+ (apply #'compilation-start (or compilation-arguments (list command)))))
(defcustom compilation-scroll-output nil
"Non-nil to scroll the *compilation* buffer window as output appears.
:type '(choice (const :tag "No scrolling" nil)
(const :tag "Scroll compilation output" t)
(const :tag "Stop scrolling at the first error" first-error))
- :version "20.3"
- :group 'compilation)
+ :version "20.3")
(defun compilation-buffer-name (name-of-mode mode-command name-function)
"If t, always kill a running compilation process before starting a new one.
If nil, ask to kill it."
:type 'boolean
- :version "24.3"
- :group 'compilation)
+ :version "24.3")
;;;###autoload
(defun compilation-start (command &optional mode name-function highlight-regexp)
(when compilation-always-kill
(set-process-query-on-exit-flag proc nil))
- (set-process-sentinel proc 'compilation-sentinel)
+ (set-process-sentinel proc #'compilation-sentinel)
(unless (eq mode t)
;; Keep the comint filter, since it's needed for proper
;; handling of the prompts.
- (set-process-filter proc 'compilation-filter))
+ (set-process-filter proc #'compilation-filter))
;; Use (point-max) here so that output comes in
;; after the initial text,
;; regardless of where the user sees point.
(let (revert-buffer-function)
(revert-buffer ignore-auto noconfirm))
(if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
- (apply 'compilation-start compilation-arguments))))
+ (apply #'compilation-start compilation-arguments))))
(defvar compilation-current-error nil
"Marker to the location from where the next error will be found.
;; It's generally preferable to use after-change-functions since they
;; can be subject to combine-after-change-calls, but if we do that, we risk
;; running our hook after font-lock, resulting in incorrect refontification.
- (add-hook 'before-change-functions 'compilation--flush-parse nil t)
+ (add-hook 'before-change-functions #'compilation--flush-parse nil t)
;; Also for minor mode, since it's not permanent-local.
(add-hook 'change-major-mode-hook #'compilation--remove-properties nil t)
(if minor
(defun compilation--unsetup ()
;; Only for minor mode.
(font-lock-remove-keywords nil (compilation-mode-font-lock-keywords))
- (remove-hook 'before-change-functions 'compilation--flush-parse t)
+ (remove-hook 'before-change-functions #'compilation--flush-parse t)
(kill-local-variable 'compilation--parsed)
(compilation--remove-properties)
(font-lock-flush))
error-parsing commands of the Compilation major mode are
available but bound to keys that don't collide with Shell mode.
See `compilation-mode'."
- nil " Shell-Compile"
- :group 'compilation
+ :lighter " Shell-Compile"
(if compilation-shell-minor-mode
(compilation-setup t)
(compilation--unsetup)))
When Compilation minor mode is enabled, all the error-parsing
commands of Compilation major mode are available. See
`compilation-mode'."
- nil " Compilation"
- :group 'compilation
+ :lighter " Compilation"
(if compilation-minor-mode
(compilation-setup t)
(compilation--unsetup)))
'compilation-message))
(setq pt (compilation-next-single-property-change
pt 'compilation-message nil
- (line-end-position)))
+ (line-end-position)))
(or (setq msg (get-text-property pt 'compilation-message))
(setq pt (point)))))
(setq last (compilation--loc->file-struct loc))
"Moved back before first %s" (point-min))))
(goto-char pt)
(or msg
- (error "No %s here" compilation-error))))
+ (user-error "No %s here" compilation-error))))
(defun compilation-previous-error (n)
"Move point to the previous error in the compilation buffer.
the current message. If nil and there is no left fringe, the message
displays at the top of the window; there is no arrow."
:type '(choice integer (const :tag "No window scrolling" nil))
- :group 'compilation
:version "22.1")
(defsubst compilation-set-window (w mk)
(numberp next-error-highlight))
;; We want highlighting: delete overlay on next input.
(add-hook 'pre-command-hook
- 'compilation-goto-locus-delete-o)
+ #'compilation-goto-locus-delete-o)
;; We don't want highlighting: delete overlay now.
(delete-overlay compilation-highlight-overlay))
;; We want highlighting for a limited time:
(if (timerp next-error-highlight-timer)
(cancel-timer next-error-highlight-timer))
(remove-hook 'pre-command-hook
- 'compilation-goto-locus-delete-o))
+ #'compilation-goto-locus-delete-o))
\f
(defun compilation-find-file (marker filename directory &rest formats)
"Find a buffer for file FILENAME.