summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-08-17 07:16:17 +0000
committerGlenn Morris <rgm@gnu.org>2007-08-17 07:16:17 +0000
commit912651fc0caeb9b205042b627626f97bb8d8caa6 (patch)
treece1c1eb5f966e0423bf4d14e1f140b08519ab2e9 /lisp/progmodes
parent5f15401ac7af44eeb7c3865ba57806f66bccaaff (diff)
downloademacs-912651fc0caeb9b205042b627626f97bb8d8caa6.tar.gz
(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.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index fcb20ede56d..96ba3f80f3b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -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))