Require CL.
(compilation-mode-font-lock-keywords): Re-install the "line as function" patch.
This commit is contained in:
parent
d5d66b7eda
commit
583a15bb15
1 changed files with 37 additions and 24 deletions
|
@ -66,9 +66,10 @@
|
|||
;; These are the value of the `message' text-properties in the compilation
|
||||
;; buffer.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(defgroup compilation nil
|
||||
"Run compiler as inferior of Emacs, parse error messages."
|
||||
:group 'tools
|
||||
|
@ -674,6 +675,18 @@ Faces `compilation-error-face', `compilation-warning-face',
|
|||
(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)
|
||||
;; The old compile.el had here an undocumented hook that
|
||||
;; allowed `line' to be a function that computed the actual
|
||||
;; error location. Let's do our best.
|
||||
`(,(car item)
|
||||
(0 (compilation-compat-error-properties
|
||||
(funcall ',line (list* (match-string ,file)
|
||||
default-directory
|
||||
',(nthcdr 4 item))
|
||||
,(if col `(match-string ,col)))))
|
||||
(,file compilation-error-face t))
|
||||
|
||||
`(,(nth 0 item)
|
||||
|
||||
,@(when (integerp file)
|
||||
|
@ -699,7 +712,7 @@ Faces `compilation-error-face', `compilation-warning-face',
|
|||
(compilation-error-properties ',file ,line ,end-line
|
||||
,col ,end-col ',(or type 2)
|
||||
',fmt)
|
||||
append)))) ; for compilation-message-face
|
||||
append))))) ; for compilation-message-face
|
||||
compilation-error-regexp-alist)
|
||||
|
||||
compilation-mode-font-lock-keywords))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue