bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5845: load-library vs. list-load-path-shadows


From: Noam Postavsky
Subject: bug#5845: load-library vs. list-load-path-shadows
Date: Tue, 16 Jan 2018 10:54:42 -0500

Should we just use case-insensitive compare for `windows-nt' systems?
The idea of using "the same heuristics" as `load' sounds nice, but as
far as I can tell, `load' just queries the file system directly. Doing
the same in `load-path-shadow-find' is far too slow (raises execution
time from 0.38s to 5.64s, and that's without any packages adding to
the load-path).

--- i/lisp/emacs-lisp/shadow.el
+++ w/lisp/emacs-lisp/shadow.el
@@ -123,7 +123,9 @@ load-path-shadows-find
         ;; 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
+                                      (if (memq system-type
'(windows-nt ms-dos))
+                      (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))

Attachment: naive-shadow-list.el
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]