changeset 9376:f0ac347309e2

(compilation-mode-font-lock-keywords): New variable. (compilation-mode): Use kill-all-local-variables. Set font-lock-keywords locally.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Oct 1994 09:52:36 +0000
parents 2cccfdee4f95
children 45228a0f6b78
files lisp/progmodes/compile.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.