Mercurial > emacs
comparison lisp/progmodes/compile.el @ 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 | 2ddf9526b8b8 |
children | b0cc803bf367 |
comparison
equal
deleted
inserted
replaced
9375:2cccfdee4f95 | 9376:f0ac347309e2 |
---|---|
249 | 249 |
250 ;; History of compile commands. | 250 ;; History of compile commands. |
251 (defvar compile-history nil) | 251 (defvar compile-history nil) |
252 ;; History of grep commands. | 252 ;; History of grep commands. |
253 (defvar grep-history nil) | 253 (defvar grep-history nil) |
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.") | |
254 | 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'. |
258 Runs COMMAND, a shell command, in a separate process asynchronously | 263 Runs COMMAND, a shell command, in a separate process asynchronously |
466 move point to the error message line and type \\[compile-goto-error]. | 471 move point to the error message line and type \\[compile-goto-error]. |
467 To kill the compilation, type \\[kill-compilation]. | 472 To kill the compilation, type \\[kill-compilation]. |
468 | 473 |
469 Runs `compilation-mode-hook' with `run-hooks' (which see)." | 474 Runs `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. |
479 (defun compilation-setup () | 486 (defun compilation-setup () |
480 ;; Make the buffer's mode line show process state. | 487 ;; Make the buffer's mode line show process state. |