# HG changeset patch # User Glenn Morris # Date 1187335033 0 # Node ID 77d2d5f85dbc66fd2043a4599e5d528fdb3d7fb4 # Parent 84edadc1cf671e4ce2cd9ce27394dde9d3450176 (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. diff -r 84edadc1cf67 -r 77d2d5f85dbc lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Fri Aug 17 04:30:09 2007 +0000 +++ b/lisp/progmodes/compile.el Fri Aug 17 07:17:13 2007 +0000 @@ -1972,7 +1972,13 @@ ;; 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))