lisp/files.el (require-with-check): Fix bug#74091.

This commit is contained in:
Stefan Monnier 2024-11-10 16:50:36 -05:00
parent 90c97d3fac
commit 3496234c8e

View file

@ -1288,10 +1288,11 @@ NOERROR is equal to `reload'), or otherwise emit a warning."
;; we did load "it". (bug#74040)
;; So use a "permissive" search which doesn't pay attention to
;; differences between file extensions.
(prefix (if (string-match
(prefix (when fn
(if (string-match
(concat (regexp-opt (get-load-suffixes)) "\\'") fn)
(concat (substring fn 0 (match-beginning 0)) ".")
fn))
fn)))
(lh load-history))
(while (and lh (let ((file (car-safe (car lh))))
(not (and file (string-prefix-p prefix file)))))