aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-07 09:52:36 +0000
committerRichard M. Stallman1994-10-07 09:52:36 +0000
commit9af0d3093f3d228405e8dd65a1873a0261fb58ca (patch)
tree470c4975b8af6b2ce83fa0c9c79a9f0dea18e2cb
parent36668a5dff3885d3d04170eb19570ba6e133a9da (diff)
downloademacs-9af0d3093f3d228405e8dd65a1873a0261fb58ca.tar.gz
emacs-9af0d3093f3d228405e8dd65a1873a0261fb58ca.zip
(compilation-mode-font-lock-keywords): New variable.
(compilation-mode): Use kill-all-local-variables. Set font-lock-keywords locally.
-rw-r--r--lisp/progmodes/compile.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f54e6e7c284..cbe125b7114 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -252,6 +252,11 @@ The head element is the directory the compilation was started in.")
252;; History of grep commands. 252;; History of grep commands.
253(defvar grep-history nil) 253(defvar grep-history nil)
254 254
255(defvar compilation-mode-font-lock-keywords
256 '(("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 1 font-lock-function-name-face))
257;;; ("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 0 font-lock-keyword-face keep)
258 "Additional expressions to highlight in Compilation mode.")
259
255;;;###autoload 260;;;###autoload
256(defun compile (command) 261(defun compile (command)
257 "Compile the program including the current buffer. Default: run `make'. 262 "Compile the program including the current buffer. Default: run `make'.
@@ -468,11 +473,13 @@ To kill the compilation, type \\[kill-compilation].
468 473
469Runs `compilation-mode-hook' with `run-hooks' (which see)." 474Runs `compilation-mode-hook' with `run-hooks' (which see)."
470 (interactive) 475 (interactive)
471 (fundamental-mode) 476 (kill-all-local-variables)
472 (use-local-map compilation-mode-map) 477 (use-local-map compilation-mode-map)
473 (setq major-mode 'compilation-mode 478 (setq major-mode 'compilation-mode
474 mode-name "Compilation") 479 mode-name "Compilation")
475 (compilation-setup) 480 (compilation-setup)
481 (set (make-local-variable 'font-lock-keywords)
482 compilation-mode-font-lock-keywords)
476 (run-hooks 'compilation-mode-hook)) 483 (run-hooks 'compilation-mode-hook))
477 484
478;; Prepare the buffer for the compilation parsing commands to work. 485;; Prepare the buffer for the compilation parsing commands to work.