aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-04-07 19:34:11 +0000
committerStefan Monnier2004-04-07 19:34:11 +0000
commit583a15bb158125e76806a31f7262e48db558b51f (patch)
treea92dc7198ce73d07050ed1698f46cc40da8264f9
parentd5d66b7edaf3ee8b3c5e87ee9147f63efa8c1439 (diff)
downloademacs-583a15bb158125e76806a31f7262e48db558b51f.tar.gz
emacs-583a15bb158125e76806a31f7262e48db558b51f.zip
Require CL.
(compilation-mode-font-lock-keywords): Re-install the "line as function" patch.
-rw-r--r--lisp/progmodes/compile.el69
1 files changed, 41 insertions, 28 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f53336c409d..e1c64392e75 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -66,9 +66,10 @@
66;; These are the value of the `message' text-properties in the compilation 66;; These are the value of the `message' text-properties in the compilation
67;; buffer. 67;; buffer.
68 68
69
70;;; Code: 69;;; Code:
71 70
71(eval-when-compile (require 'cl))
72
72(defgroup compilation nil 73(defgroup compilation nil
73 "Run compiler as inferior of Emacs, parse error messages." 74 "Run compiler as inferior of Emacs, parse error messages."
74 :group 'tools 75 :group 'tools
@@ -673,33 +674,45 @@ Faces `compilation-error-face', `compilation-warning-face',
673 (if (consp file) (setq fmt (cdr file) file (car file))) 674 (if (consp file) (setq fmt (cdr file) file (car file)))
674 (if (consp line) (setq end-line (cdr line) line (car line))) 675 (if (consp line) (setq end-line (cdr line) line (car line)))
675 (if (consp col) (setq end-col (cdr col) col (car col))) 676 (if (consp col) (setq end-col (cdr col) col (car col)))
676 677
677 `(,(nth 0 item) 678 (if (symbolp line)
678 679 ;; The old compile.el had here an undocumented hook that
679 ,@(when (integerp file) 680 ;; allowed `line' to be a function that computed the actual
680 `((,file ,(if (consp type) 681 ;; error location. Let's do our best.
681 `(compilation-face ',type) 682 `(,(car item)
682 (aref [compilation-info-face 683 (0 (compilation-compat-error-properties
683 compilation-warning-face 684 (funcall ',line (list* (match-string ,file)
684 compilation-error-face] 685 default-directory
685 (or type 2)))))) 686 ',(nthcdr 4 item))
686 687 ,(if col `(match-string ,col)))))
687 ,@(when line 688 (,file compilation-error-face t))
688 `((,line compilation-line-face nil t))) 689
689 ,@(when end-line 690 `(,(nth 0 item)
690 `((,end-line compilation-line-face nil t))) 691
691 692 ,@(when (integerp file)
692 ,@(when col 693 `((,file ,(if (consp type)
693 `((,col compilation-column-face nil t))) 694 `(compilation-face ',type)
694 ,@(when end-col 695 (aref [compilation-info-face
695 `((,end-col compilation-column-face nil t))) 696 compilation-warning-face
696 697 compilation-error-face]
697 ,@(nthcdr 6 item) 698 (or type 2))))))
698 (,(or (nth 5 item) 0) 699
699 (compilation-error-properties ',file ,line ,end-line 700 ,@(when line
700 ,col ,end-col ',(or type 2) 701 `((,line compilation-line-face nil t)))
701 ',fmt) 702 ,@(when end-line
702 append)))) ; for compilation-message-face 703 `((,end-line compilation-line-face nil t)))
704
705 ,@(when col
706 `((,col compilation-column-face nil t)))
707 ,@(when end-col
708 `((,end-col compilation-column-face nil t)))
709
710 ,@(nthcdr 6 item)
711 (,(or (nth 5 item) 0)
712 (compilation-error-properties ',file ,line ,end-line
713 ,col ,end-col ',(or type 2)
714 ',fmt)
715 append))))) ; for compilation-message-face
703 compilation-error-regexp-alist) 716 compilation-error-regexp-alist)
704 717
705 compilation-mode-font-lock-keywords)) 718 compilation-mode-font-lock-keywords))