]> code.delx.au - gnu-emacs/commitdiff
(compilation-error-properties): When getting the file from the
authorRichard M. Stallman <rms@gnu.org>
Mon, 26 Sep 2005 00:01:27 +0000 (00:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 26 Sep 2005 00:01:27 +0000 (00:01 +0000)
previous error message, correctly decode the new data format.

lisp/ChangeLog
lisp/progmodes/compile.el

index 9c9bc0d1eb1be3df851955de049b70d110a5368d..62cd1a6df9e5b85358ec12dffd9f0f3e3648276f 100644 (file)
@@ -1,3 +1,12 @@
+2005-09-25  Richard M. Stallman  <rms@gnu.org>
+
+       * progmodes/compile.el (compilation-error-properties):
+       When getting the file from the previous error message,
+       correctly decode the new data format.
+
+       * progmodes/cc-cmds.el (c-electric-paren):
+       Call old-blink-paren only for close-paren.
+
 2005-09-24  Andreas Schwab  <schwab@suse.de>
 
        * term/rxvt.el (rxvt-register-default-colors): Delete redundant
index 5ff256e5f8fb1581777419e13f036981982d0d8c..3ef1c0c1ff6f90c7c38dbb46f7a6216face0a0e8 100644 (file)
@@ -614,6 +614,7 @@ Faces `compilation-error-face', `compilation-warning-face',
 ;; This function is the central driver, called when font-locking to gather
 ;; all information needed to later jump to corresponding source code.
 ;; Return a property list with all meta information on this error location.
+
 (defun compilation-error-properties (file line end-line col end-col type fmt)
   (unless (< (next-single-property-change (match-beginning 0) 'directory nil (point))
             (point))
@@ -628,11 +629,22 @@ Faces `compilation-error-face', `compilation-warning-face',
                                    (get-text-property dir 'directory)))))
            (setq file (cons file (car dir)))))
       ;; This message didn't mention one, get it from previous
-      (setq file (previous-single-property-change (point) 'message)
-           file (or (if file
-                        (car (nth 2 (car (or (get-text-property (1- file) 'message)
-                                        (get-text-property file 'message))))))
-                    '("*unknown*"))))
+      (let ((prev-pos
+            ;; Find the previous message.
+            (previous-single-property-change (point) 'message)))
+       (if prev-pos
+           ;; Get the file structure that belongs to it.
+           (let* ((prev
+                   (or (get-text-property (1- prev-pos) 'message)
+                       (get-text-property prev-pos 'message)))
+                  (prev-struct
+                   (car (nth 2 (car prev)))))
+             ;; Construct FILE . DIR from that.
+             (if prev-struct
+                 (setq file (cons (car prev-struct)
+                                  (cadr prev-struct))))))
+       (unless file
+         (setq file '("*unknown*")))))
     ;; All of these fields are optional, get them only if we have an index, and
     ;; it matched some part of the message.
     (and line