]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix error in compilation-error-properties.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 21 Aug 2011 02:07:00 +0000 (22:07 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 21 Aug 2011 02:07:00 +0000 (22:07 -0400)
* lisp/progmodes/compile.el (compilation-error-properties): Fix
confusion between file struct and message struct (Bug#9319).

lisp/ChangeLog
lisp/progmodes/compile.el

index 06dd2bf11984a14f921e15a91889a77f6ff80974..53fbdf00087a9216236055a297a2cd561c0c0936 100644 (file)
@@ -1,5 +1,8 @@
 2011-08-21  Chong Yidong  <cyd@stupidchicken.com>
 
+       * progmodes/compile.el (compilation-error-properties): Fix
+       confusion between file struct and message struct (Bug#9319).
+
        * net/browse-url.el (browse-url-firefox): Don't call
        browse-url-firefox-sentinel unless using -remote (Bug#9328).
 
index f3b873c8b1ef60bfd18a6ca12e727970a25b5adc..33bd9ff96a71086e2109196072fa1f9dfac2ac20 100644 (file)
@@ -985,12 +985,15 @@ POS and RES.")
            (let* ((prev
                    (or (get-text-property (1- prev-pos) 'compilation-message)
                        (get-text-property prev-pos 'compilation-message)))
-                  (prev-struct
-                   (car (nth 2 (car prev)))))
+                  (prev-file-struct
+                   (and prev
+                        (compilation--loc->file-struct
+                         (compilation--message->loc prev)))))
+
              ;; Construct FILE . DIR from that.
-             (if prev-struct
-                 (setq file (cons (car prev-struct)
-                                  (cadr prev-struct))))))
+             (if prev-file-struct
+                 (setq file (cons (caar prev-file-struct)
+                                  (cadr (car prev-file-struct)))))))
        (unless file
          (setq file '("*unknown*")))))
     ;; All of these fields are optional, get them only if we have an index, and