1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00

(compilation-mode-font-lock-keywords):

Redo one more thing that I didn't notice Daniel had undone.
This commit is contained in:
Stefan Monnier 2004-04-08 22:16:14 +00:00
parent 91e88cea86
commit 91fa27cd32
2 changed files with 80 additions and 58 deletions

View File

@ -1,3 +1,8 @@
2004-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el (compilation-mode-font-lock-keywords):
Redo one more thing that I didn't notice Daniel had undone.
2004-04-08 Nick Roberts <nick@nick.uklinux.net> 2004-04-08 Nick Roberts <nick@nick.uklinux.net>
* progmodes/gdb-ui.el (gdb-source-window): Remove variable * progmodes/gdb-ui.el (gdb-source-window): Remove variable
@ -87,6 +92,19 @@
* help-mode.el (help-function-def, help-variable-def): Handle hyperrefs * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs
to C source files specially. to C source files specially.
2004-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el: Require CL.
(compilation-mode-font-lock-keywords): Re-install the "line as
function" patch.
* help-fns.el (help-C-source-directory): New var.
(help-subr-name, help-C-file-name, help-find-C-source): New funs.
(describe-function-1, describe-variable): Use them.
* help-mode.el (help-function-def, help-variable-def): Handle hyperrefs
to C source files specially.
2004-04-07 Jan Nieuwenhuizen <janneke@gnu.org> 2004-04-07 Jan Nieuwenhuizen <janneke@gnu.org>
* info.el (Info-hide-cookies-node): New function. * info.el (Info-hide-cookies-node): New function.

View File

@ -650,72 +650,76 @@ Faces `compilation-error-face', `compilation-warning-face',
(defun compilation-mode-font-lock-keywords () (defun compilation-mode-font-lock-keywords ()
"Return expressions to highlight in Compilation mode." "Return expressions to highlight in Compilation mode."
(nconc (if compilation-parse-errors-function
;; make directory tracking ;; An old package! Try the compatibility code.
(if compilation-directory-matcher '((compilation-compat-parse-errors))
`((,(car compilation-directory-matcher) (append
,@(mapcar (lambda (elt) ;; make directory tracking
`(,(car elt) (if compilation-directory-matcher
(compilation-directory-properties `((,(car compilation-directory-matcher)
,(car elt) ,(cdr elt)) ,@(mapcar (lambda (elt)
t)) `(,(car elt)
(cdr compilation-directory-matcher))))) (compilation-directory-properties
,(car elt) ,(cdr elt))
t))
(cdr compilation-directory-matcher)))))
;; Compiler warning/error lines. ;; Compiler warning/error lines.
(mapcar (lambda (item) (mapcar
(if (symbolp item) (lambda (item)
(setq item (cdr (assq item (if (symbolp item)
compilation-error-regexp-alist-alist)))) (setq item (cdr (assq item
(let ((file (nth 1 item)) compilation-error-regexp-alist-alist))))
(line (nth 2 item)) (let ((file (nth 1 item))
(col (nth 3 item)) (line (nth 2 item))
(type (nth 4 item)) (col (nth 3 item))
end-line end-col fmt) (type (nth 4 item))
(if (consp file) (setq fmt (cdr file) file (car file))) end-line end-col fmt)
(if (consp line) (setq end-line (cdr line) line (car line))) (if (consp file) (setq fmt (cdr file) file (car file)))
(if (consp col) (setq end-col (cdr col) col (car col))) (if (consp line) (setq end-line (cdr line) line (car line)))
(if (consp col) (setq end-col (cdr col) col (car col)))
(if (symbolp line) (if (symbolp line)
;; The old compile.el had here an undocumented hook that ;; The old compile.el had here an undocumented hook that
;; allowed `line' to be a function that computed the actual ;; allowed `line' to be a function that computed the actual
;; error location. Let's do our best. ;; error location. Let's do our best.
`(,(car item) `(,(car item)
(0 (compilation-compat-error-properties (0 (compilation-compat-error-properties
(funcall ',line (list* (match-string ,file) (funcall ',line (list* (match-string ,file)
default-directory default-directory
',(nthcdr 4 item)) ',(nthcdr 4 item))
,(if col `(match-string ,col))))) ,(if col `(match-string ,col)))))
(,file compilation-error-face t)) (,file compilation-error-face t))
`(,(nth 0 item) `(,(nth 0 item)
,@(when (integerp file) ,@(when (integerp file)
`((,file ,(if (consp type) `((,file ,(if (consp type)
`(compilation-face ',type) `(compilation-face ',type)
(aref [compilation-info-face (aref [compilation-info-face
compilation-warning-face compilation-warning-face
compilation-error-face] compilation-error-face]
(or type 2)))))) (or type 2))))))
,@(when line ,@(when line
`((,line compilation-line-face nil t))) `((,line compilation-line-face nil t)))
,@(when end-line ,@(when end-line
`((,end-line compilation-line-face nil t))) `((,end-line compilation-line-face nil t)))
,@(when col ,@(when col
`((,col compilation-column-face nil t))) `((,col compilation-column-face nil t)))
,@(when end-col ,@(when end-col
`((,end-col compilation-column-face nil t))) `((,end-col compilation-column-face nil t)))
,@(nthcdr 6 item) ,@(nthcdr 6 item)
(,(or (nth 5 item) 0) (,(or (nth 5 item) 0)
(compilation-error-properties ',file ,line ,end-line (compilation-error-properties ',file ,line ,end-line
,col ,end-col ',(or type 2) ,col ,end-col ',(or type 2)
',fmt) ',fmt)
append))))) ; for compilation-message-face append))))) ; for compilation-message-face
compilation-error-regexp-alist) compilation-error-regexp-alist)
compilation-mode-font-lock-keywords)) compilation-mode-font-lock-keywords)))
;;;###autoload ;;;###autoload