From: Chong Yidong Date: Sun, 16 Sep 2012 04:16:51 +0000 (+0800) Subject: In compilation-error-regexp-alist, allow more HIGHLIGHT types. X-Git-Tag: emacs-24.2.90~273^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c584eaf9c704543845e949acb76d8d591226aa71;p=emacs.git 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b436d9e364e..9d5f70eb224 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-09-16 Chong Yidong + + * progmodes/compile.el (compilation-parse-errors): Apply any value + that is a valid font-lock-face property (Bug#12136). + (compilation-error-regexp-alist): Doc fix. + 2012-09-15 Glenn Morris * 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 `compilation-message-face' applied. If this is nil, the text matched by the whole REGEXP becomes the hyperlink. -Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is -the number of a submatch that should be highlighted when it matches, -and FACE is an expression returning the face to use for that submatch.." +Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where +SUBMATCH is the number of a submatch and FACE is an expression +which evaluates to a face (more precisely, a valid value for the +`font-lock-face' property) for highlighting the submatch." :type '(repeat (choice (symbol :tag "Predefined symbol") (sexp :tag "Error specification"))) :link `(file-link :tag "example file" @@ -1334,7 +1335,9 @@ to `compilation-error-regexp-alist' if RULES is nil." (let ((face (eval (car extra-item)))) (cond ((null face)) - ((symbolp face) + ((or (symbolp face) + (stringp face) + (listp face)) (put-text-property (match-beginning mn) (match-end mn) 'font-lock-face face))