aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2018-01-18 14:02:32 -0800
committerGlenn Morris2018-01-18 17:17:06 -0800
commit6213ce554410213d5ffd3acb09ea2ebde8402281 (patch)
treeea1e832bd51e9ee2ffb38e211ca74d0845035e06 /lisp
parent224fc14ab8354a6b47bb15ec1c825edb71bc2500 (diff)
parent76040d1eae4464b468481231c15e7fb86f4b11d8 (diff)
downloademacs-6213ce554410213d5ffd3acb09ea2ebde8402281.tar.gz
emacs-6213ce554410213d5ffd3acb09ea2ebde8402281.zip
Merge from origin/emacs-26
76040d1 (origin/emacs-26) Handle case-insensitive filenames for load-... 0c9b050 ; * test/file-organization.org: Fix typo.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/shadow.el10
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."
78 shadows ; List of shadowings, to be returned. 78 shadows ; List of shadowings, to be returned.
79 files ; File names ever seen, with dirs. 79 files ; File names ever seen, with dirs.
80 dir ; The dir being currently scanned. 80 dir ; The dir being currently scanned.
81 dir-case-insensitive ; `file-name-case-insentive-p' for dir.
81 curr-files ; This dir's Emacs Lisp files. 82 curr-files ; This dir's Emacs Lisp files.
82 orig-dir ; Where the file was first seen. 83 orig-dir ; Where the file was first seen.
83 files-seen-this-dir ; Files seen so far in this dir. 84 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."
104 (message "Checking %d files in %s..." (length curr-files) dir)) 105 (message "Checking %d files in %s..." (length curr-files) dir))
105 106
106 (setq files-seen-this-dir nil) 107 (setq files-seen-this-dir nil)
108 ;; We assume that case sensitivity of a directory applies to
109 ;; its files.
110 (setq dir-case-insensitive (file-name-case-insensitive-p dir))
107 111
108 (dolist (file curr-files) 112 (dolist (file curr-files)
109 113
@@ -123,10 +127,12 @@ See the documentation for `list-load-path-shadows' for further information."
123 ;; XXX.elc (or vice-versa) when they are in the same directory. 127 ;; XXX.elc (or vice-versa) when they are in the same directory.
124 (setq files-seen-this-dir (cons file files-seen-this-dir)) 128 (setq files-seen-this-dir (cons file files-seen-this-dir))
125 129
126 (if (setq orig-dir (assoc file files)) 130 (if (setq orig-dir (assoc file files
131 (when dir-case-insensitive
132 (lambda (f1 f2) (eq (compare-strings f1 nil nil f2 nil nil t) t)))))
127 ;; This file was seen before, we have a shadowing. 133 ;; This file was seen before, we have a shadowing.
128 ;; Report it unless the files are identical. 134 ;; Report it unless the files are identical.
129 (let ((base1 (concat (cdr orig-dir) "/" file)) 135 (let ((base1 (concat (cdr orig-dir) "/" (car orig-dir)))
130 (base2 (concat dir "/" file))) 136 (base2 (concat dir "/" file)))
131 (if (not (and load-path-shadows-compare-text 137 (if (not (and load-path-shadows-compare-text
132 (load-path-shadows-same-file-or-nonexistent 138 (load-path-shadows-same-file-or-nonexistent