Commit 9af0d309 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(compilation-mode-font-lock-keywords): New variable.

(compilation-mode): Use kill-all-local-variables.
Set font-lock-keywords locally.
parent 36668a5d
......@@ -252,6 +252,11 @@ The head element is the directory the compilation was started in.")
;; History of grep commands.
(defvar grep-history nil)
(defvar compilation-mode-font-lock-keywords
'(("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 1 font-lock-function-name-face))
;;; ("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 0 font-lock-keyword-face keep)
"Additional expressions to highlight in Compilation mode.")
(defun compile (command)
"Compile the program including the current buffer. Default: run `make'.
......@@ -468,11 +473,13 @@ To kill the compilation, type \\[kill-compilation].
Runs `compilation-mode-hook' with `run-hooks' (which see)."
(use-local-map compilation-mode-map)
(setq major-mode 'compilation-mode
mode-name "Compilation")
(set (make-local-variable 'font-lock-keywords)
(run-hooks 'compilation-mode-hook))
;; Prepare the buffer for the compilation parsing commands to work.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment