# HG changeset patch # User Richard M. Stallman # Date 781523556 0 # Node ID f0ac347309e2ccadd4ae56ff35015d97522f94c1 # Parent 2cccfdee4f95fda586ae3aa3b7ead28178702de5 (compilation-mode-font-lock-keywords): New variable. (compilation-mode): Use kill-all-local-variables. Set font-lock-keywords locally. diff -r 2cccfdee4f95 -r f0ac347309e2 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Fri Oct 07 09:49:47 1994 +0000 +++ b/lisp/progmodes/compile.el Fri Oct 07 09:52:36 1994 +0000 @@ -252,6 +252,11 @@ ;; 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.") + ;;;###autoload (defun compile (command) "Compile the program including the current buffer. Default: run `make'. @@ -468,11 +473,13 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)." (interactive) - (fundamental-mode) + (kill-all-local-variables) (use-local-map compilation-mode-map) (setq major-mode 'compilation-mode mode-name "Compilation") (compilation-setup) + (set (make-local-variable 'font-lock-keywords) + compilation-mode-font-lock-keywords) (run-hooks 'compilation-mode-hook)) ;; Prepare the buffer for the compilation parsing commands to work.