]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-mode-font-lock-keywords):
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 8 Apr 2004 22:16:14 +0000 (22:16 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 8 Apr 2004 22:16:14 +0000 (22:16 +0000)
Redo one more thing that I didn't notice Daniel had undone.

lisp/ChangeLog
lisp/progmodes/compile.el

index b9fe783b9d0ae7b361b8a56316a36329956ebe49..fd15aaf2004abe9fea5cf4bbd987d3d5783f1116 100644 (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>
 
        * progmodes/gdb-ui.el (gdb-source-window): Remove variable
        * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs
        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>
 
        * info.el (Info-hide-cookies-node): New function.
index e1c64392e755c6f348c336dc1fb1ce8058207fcc..9d2544628d0d34c64752ba773ec5cee5e75f7b1e 100644 (file)
@@ -650,72 +650,76 @@ Faces `compilation-error-face', `compilation-warning-face',
 
 (defun compilation-mode-font-lock-keywords ()
   "Return expressions to highlight in Compilation mode."
-  (nconc
-   ;; make directory tracking
-   (if compilation-directory-matcher
-       `((,(car compilation-directory-matcher)
-         ,@(mapcar (lambda (elt)
-                     `(,(car elt)
-                       (compilation-directory-properties
-                        ,(car elt) ,(cdr elt))
-                       t))
-                   (cdr compilation-directory-matcher)))))
-
-   ;; Compiler warning/error lines.
-   (mapcar (lambda (item)
-            (if (symbolp item)
-                (setq item (cdr (assq item
-                                      compilation-error-regexp-alist-alist))))
-            (let ((file (nth 1 item))
-                  (line (nth 2 item))
-                  (col (nth 3 item))
-                  (type (nth 4 item))
-                  end-line end-col fmt)
-              (if (consp file) (setq fmt (cdr file)      file (car file)))
-              (if (consp line) (setq end-line (cdr line) line (car line)))
-              (if (consp col)  (setq end-col (cdr col)   col (car col)))
+  (if compilation-parse-errors-function
+      ;; An old package!  Try the compatibility code.
+      '((compilation-compat-parse-errors))
+    (append
+     ;; make directory tracking
+     (if compilation-directory-matcher
+        `((,(car compilation-directory-matcher)
+           ,@(mapcar (lambda (elt)
+                       `(,(car elt)
+                         (compilation-directory-properties
+                          ,(car elt) ,(cdr elt))
+                         t))
+                     (cdr compilation-directory-matcher)))))
+
+     ;; Compiler warning/error lines.
+     (mapcar
+      (lambda (item)
+       (if (symbolp item)
+           (setq item (cdr (assq item
+                                 compilation-error-regexp-alist-alist))))
+       (let ((file (nth 1 item))
+             (line (nth 2 item))
+             (col (nth 3 item))
+             (type (nth 4 item))
+             end-line end-col fmt)
+         (if (consp file) (setq fmt (cdr file)   file (car file)))
+         (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))
+         (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)
-                      `((,file ,(if (consp type)
-                                    `(compilation-face ',type)
-                                  (aref [compilation-info-face
-                                         compilation-warning-face
-                                         compilation-error-face]
-                                        (or type 2))))))
-
-                  ,@(when line
-                      `((,line compilation-line-face nil t)))
-                  ,@(when end-line
-                      `((,end-line compilation-line-face nil t)))
-
-                  ,@(when col
-                      `((,col compilation-column-face nil t)))
-                  ,@(when end-col
-                      `((,end-col compilation-column-face nil t)))
-
-                  ,@(nthcdr 6 item)
-                  (,(or (nth 5 item) 0)
-                   (compilation-error-properties ',file ,line ,end-line
-                                                 ,col ,end-col ',(or type 2)
-                                                 ',fmt)
-                   append)))))         ; for compilation-message-face
-          compilation-error-regexp-alist)
-
-   compilation-mode-font-lock-keywords))
+           `(,(nth 0 item)
+
+             ,@(when (integerp file)
+                 `((,file ,(if (consp type)
+                               `(compilation-face ',type)
+                             (aref [compilation-info-face
+                                    compilation-warning-face
+                                    compilation-error-face]
+                                   (or type 2))))))
+
+             ,@(when line
+                 `((,line compilation-line-face nil t)))
+             ,@(when end-line
+                 `((,end-line compilation-line-face nil t)))
+
+             ,@(when col
+                 `((,col compilation-column-face nil t)))
+             ,@(when end-col
+                 `((,end-col compilation-column-face nil t)))
+
+             ,@(nthcdr 6 item)
+             (,(or (nth 5 item) 0)
+              (compilation-error-properties ',file ,line ,end-line
+                                            ,col ,end-col ',(or type 2)
+                                            ',fmt)
+              append)))))              ; for compilation-message-face
+      compilation-error-regexp-alist)
+
+     compilation-mode-font-lock-keywords)))
 
 \f
 ;;;###autoload