diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/shadow.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 88a494fdd40..1788f0d71f7 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -78,6 +78,7 @@ See the documentation for `list-load-path-shadows' for further information." shadows ; List of shadowings, to be returned. files ; File names ever seen, with dirs. dir ; The dir being currently scanned. + dir-case-insensitive ; `file-name-case-insentive-p' for dir. curr-files ; This dir's Emacs Lisp files. orig-dir ; Where the file was first seen. files-seen-this-dir ; Files seen so far in this dir. @@ -104,6 +105,9 @@ See the documentation for `list-load-path-shadows' for further information." (message "Checking %d files in %s..." (length curr-files) dir)) (setq files-seen-this-dir nil) + ;; We assume that case sensitivity of a directory applies to + ;; its files. + (setq dir-case-insensitive (file-name-case-insensitive-p dir)) (dolist (file curr-files) @@ -123,10 +127,12 @@ See the documentation for `list-load-path-shadows' for further information." ;; XXX.elc (or vice-versa) when they are in the same directory. (setq files-seen-this-dir (cons file files-seen-this-dir)) - (if (setq orig-dir (assoc file files)) + (if (setq orig-dir (assoc file files + (when dir-case-insensitive + (lambda (f1 f2) (eq (compare-strings f1 nil nil f2 nil nil t) t))))) ;; This file was seen before, we have a shadowing. ;; Report it unless the files are identical. - (let ((base1 (concat (cdr orig-dir) "/" file)) + (let ((base1 (concat (cdr orig-dir) "/" (car orig-dir))) (base2 (concat dir "/" file))) (if (not (and load-path-shadows-compare-text (load-path-shadows-same-file-or-nonexistent |