aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-09-16 12:16:51 +0800
committerChong Yidong2012-09-16 12:16:51 +0800
commitc584eaf9c704543845e949acb76d8d591226aa71 (patch)
tree05bfc9db322480522fa115ede86576fb0032ed21
parent72aa16e19b24eb73c812c13d4cd77afd7977fc25 (diff)
downloademacs-c584eaf9c704543845e949acb76d8d591226aa71.tar.gz
emacs-c584eaf9c704543845e949acb76d8d591226aa71.zip
In compilation-error-regexp-alist, allow more HIGHLIGHT types.
* progmodes/compile.el (compilation-parse-errors): Apply any value that is a valid font-lock-face property. (compilation-error-regexp-alist): Doc fix. Fixes: debbugs:12136
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/compile.el11
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b436d9e364e..9d5f70eb224 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-09-16 Chong Yidong <cyd@gnu.org>
2
3 * progmodes/compile.el (compilation-parse-errors): Apply any value
4 that is a valid font-lock-face property (Bug#12136).
5 (compilation-error-regexp-alist): Doc fix.
6
12012-09-15 Glenn Morris <rgm@gnu.org> 72012-09-15 Glenn Morris <rgm@gnu.org>
2 8
3 * version.el (emacs-bzr-version-bzr): New function. 9 * version.el (emacs-bzr-version-bzr): New function.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index fbb0c9e204a..ae2f6973fa5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -488,9 +488,10 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and
488`compilation-message-face' applied. If this is nil, the text 488`compilation-message-face' applied. If this is nil, the text
489matched by the whole REGEXP becomes the hyperlink. 489matched by the whole REGEXP becomes the hyperlink.
490 490
491Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is 491Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where
492the number of a submatch that should be highlighted when it matches, 492SUBMATCH is the number of a submatch and FACE is an expression
493and FACE is an expression returning the face to use for that submatch.." 493which evaluates to a face (more precisely, a valid value for the
494`font-lock-face' property) for highlighting the submatch."
494 :type '(repeat (choice (symbol :tag "Predefined symbol") 495 :type '(repeat (choice (symbol :tag "Predefined symbol")
495 (sexp :tag "Error specification"))) 496 (sexp :tag "Error specification")))
496 :link `(file-link :tag "example file" 497 :link `(file-link :tag "example file"
@@ -1334,7 +1335,9 @@ to `compilation-error-regexp-alist' if RULES is nil."
1334 (let ((face (eval (car extra-item)))) 1335 (let ((face (eval (car extra-item))))
1335 (cond 1336 (cond
1336 ((null face)) 1337 ((null face))
1337 ((symbolp face) 1338 ((or (symbolp face)
1339 (stringp face)
1340 (listp face))
1338 (put-text-property 1341 (put-text-property
1339 (match-beginning mn) (match-end mn) 1342 (match-beginning mn) (match-end mn)
1340 'font-lock-face face)) 1343 'font-lock-face face))