Function: compilation-mode

compilation-mode is an autoloaded, interactive and byte-compiled function defined in compile.el.gz.

Signature

(compilation-mode &optional NAME-OF-MODE)

Documentation

Major mode for compilation log buffers.

To visit the source for a line-numbered error, move point to the error message line and type RET (compile-goto-error). To kill the compilation, type C-c C-k (kill-compilation).

Runs compilation-mode-hook with run-mode-hooks (which see).

- negative-argument
0 digit-argument
1 digit-argument
2 digit-argument
3 digit-argument
4 digit-argument
5 digit-argument
6 digit-argument
7 digit-argument
8 digit-argument
9 digit-argument
< beginning-of-buffer
<backtab> compilation-previous-error
<follow-link> mouse-face
<mouse-2> compile-goto-error
> end-of-buffer
? describe-mode
C-c C-c compile-goto-error
C-c C-f next-error-follow-minor-mode(var)/next-error-follow-minor-mode(fun)
C-c C-k kill-compilation
C-o compilation-display-error
DEL scroll-down-command
M-n compilation-next-error
M-p compilation-previous-error
M-{ compilation-previous-file
M-} compilation-next-file
RET compile-goto-error
S-SPC scroll-down-command
SPC scroll-up-command
SPC..~ undefined
TAB compilation-next-error
g recompile
g revert-buffer
h describe-mode
n next-error-no-select
p previous-error-no-select
q quit-window

Probably introduced at or before Emacs version 19.29.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
;;;###autoload
(defun compilation-mode (&optional name-of-mode)
  "Major mode for compilation log buffers.
\\<compilation-mode-map>To visit the source for a line-numbered error,
move point to the error message line and type \\[compile-goto-error].
To kill the compilation, type \\[kill-compilation].

Runs `compilation-mode-hook' with `run-mode-hooks' (which see).

\\{compilation-mode-map}"
  (interactive)
  (kill-all-local-variables)
  (use-local-map compilation-mode-map)
  ;; Let windows scroll along with the output.
  (setq-local window-point-insertion-type t)
  (setq-local tool-bar-map compilation-mode-tool-bar-map)
  (setq major-mode 'compilation-mode ; FIXME: Use define-derived-mode.
	mode-name (or name-of-mode "Compilation"))
  (setq-local page-delimiter compilation-page-delimiter)
  ;; (setq-local compilation-buffer-modtime nil)
  (compilation-setup)
  ;; Turn off deferred fontifications in the compilation buffer, if
  ;; the user turned them on globally.  This is because idle timers
  ;; aren't re-run after receiving input from a subprocess, so the
  ;; buffer is left unfontified after the compilation exits, until
  ;; some other input event happens.
  (setq-local jit-lock-defer-time nil)
  (setq buffer-read-only t)
  (run-mode-hooks 'compilation-mode-hook))