]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-mode-font-lock-keywords): New variable.
authorRichard M. Stallman <rms@gnu.org>
Fri, 7 Oct 1994 09:52:36 +0000 (09:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 7 Oct 1994 09:52:36 +0000 (09:52 +0000)
(compilation-mode): Use kill-all-local-variables.
Set font-lock-keywords locally.

lisp/progmodes/compile.el

index f54e6e7c284bb695f245c2cd88bef2e8a1b7aea2..cbe125b7114139f08656aaa97daa113a39f4495f 100644 (file)
@@ -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.")
+
 ;;;###autoload
 (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)."
   (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.