]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/compile.el
(compilation-get-file-structure): Make use of the directory part when
[gnu-emacs] / lisp / progmodes / compile.el
index fcb20ede56dfe7a46b380c0ae6863c7aefad7e16..96ba3f80f3b4a5d1ca5888a3e6894a6c9555a93b 100644 (file)
@@ -1935,7 +1935,13 @@ The file-structure looks like this:
        ;; Store it for the possibly unnormalized name
        (puthash file
                 ;; Retrieve or create file-structure for normalized name
-                (or (gethash (list filename) compilation-locs)
+                ;; The gethash used to not use spec-directory, but
+                ;; this leads to errors when files in different
+                ;; directories have the same name:
+                ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00463.html
+                (or (gethash (cons filename spec-directory) compilation-locs)
+                    ;; TODO should this, without spec-directory, be
+                    ;; done at all?
                     (puthash (list filename)
                              (list (list filename spec-directory) fmt)
                              compilation-locs))