]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-get-file-structure): Make use of the directory part when
authorGlenn Morris <rgm@gnu.org>
Fri, 17 Aug 2007 07:17:45 +0000 (07:17 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 17 Aug 2007 07:17:45 +0000 (07:17 +0000)
checking for an existing entry, to handle files with same basename in
different directories.

lisp/ChangeLog
lisp/progmodes/compile.el

index d3bd2089d4c3f32cc691d4b4571e9233098aa2b9..2f6ee763d1dbc9d0462b5360d69fbc5cbaf087f7 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-17  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/compile.el (compilation-get-file-structure): Make use
+       of the directory part when checking for an existing entry, to
+       handle files with same basename in different directories.
+
 2007-08-17  Jay Belanger  <jay.p.belanger@gmail.com>
 
        * calc/calc.el (calc-language-alist): Add texinfo-mode.
index 805ed3c40404150476f4aec579ec27eeb48756d0..9b83cfc9f3d60fb3bff6a285ec439f382bdf9bb5 100644 (file)
@@ -1972,7 +1972,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))