diff options
| author | Simon Marshall | 1997-02-21 09:42:44 +0000 |
|---|---|---|
| committer | Simon Marshall | 1997-02-21 09:42:44 +0000 |
| commit | e93b2a554147ca9213779fde37caeff989b6dc9a (patch) | |
| tree | cc35492bb1388997b1ea1b21a0b8e7683c2e076a | |
| parent | 56fcbd7e9d76f143abef1c13361efe41052ef59d (diff) | |
| download | emacs-e93b2a554147ca9213779fde37caeff989b6dc9a.tar.gz emacs-e93b2a554147ca9213779fde37caeff989b6dc9a.zip | |
Rewrite Font Lock support.
| -rw-r--r-- | lisp/progmodes/compile.el | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ab93cd447ec..be6b2436c38 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. | 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 1995, 1996 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Roland McGrath <roland@prep.ai.mit.edu> | 5 | ;; Author: Roland McGrath <roland@prep.ai.mit.edu> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -309,12 +309,22 @@ write into the compilation buffer, and to put in its mode line.") | |||
| 309 | ;; History of grep commands. | 309 | ;; History of grep commands. |
| 310 | (defvar grep-history nil) | 310 | (defvar grep-history nil) |
| 311 | 311 | ||
| 312 | (defvar compilation-mode-font-lock-keywords | 312 | (defun compilation-mode-font-lock-keywords () |
| 313 | ;; This regexp needs a bit of rewriting. What is the third grouping for? | 313 | "Return expressions to highlight in Compilation mode." |
| 314 | '(("^\\([a-zA-Z]?:?[^ \n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" | 314 | (nconc |
| 315 | 1 font-lock-function-name-face)) | 315 | ;; |
| 316 | ;;; ("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 0 font-lock-keyword-face keep) | 316 | ;; Compiler warning/error lines. |
| 317 | "Additional expressions to highlight in Compilation mode.") | 317 | (mapcar #'(lambda (item) |
| 318 | (list (nth 0 item) | ||
| 319 | (list (nth 1 item) 'font-lock-warning-face nil t) | ||
| 320 | (list (nth 2 item) 'font-lock-variable-name-face nil t))) | ||
| 321 | compilation-error-regexp-alist) | ||
| 322 | (list | ||
| 323 | ;; | ||
| 324 | ;; Compiler output lines. Recognise `make[n]:' lines too. | ||
| 325 | '("^\\([A-Za-z_0-9/\.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" | ||
| 326 | (1 font-lock-function-name-face) (3 font-lock-comment-face nil t))) | ||
| 327 | )) | ||
| 318 | 328 | ||
| 319 | ;;;###autoload | 329 | ;;;###autoload |
| 320 | (defun compile (command) | 330 | (defun compile (command) |