From: Lars Ingebrigtsen Date: Sat, 12 Mar 2022 21:54:28 +0000 (+0100) Subject: Further locate-file fixes on nativecomp X-Git-Tag: emacs-29.0.90~1931^2~1170 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49683652f8b7f3680b3bc76cfee39be0b8efd524;p=emacs.git Further locate-file fixes on nativecomp * lisp/files.el (locate-file): Fix up previous locate-file change -- don't unconditionally return .elc on nativecomp. --- diff --git a/lisp/files.el b/lisp/files.el index 327375ddaa4..7be93662b1c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -996,7 +996,8 @@ one or more of those symbols." ;; return here (if it exists). (let* ((el (gethash (file-name-nondirectory file) comp-eln-to-el-h)) (elc (replace-regexp-in-string "\\.el\\'" ".elc" el))) - (if (file-exists-p elc) + (if (and (member ".elc" suffixes) + (file-exists-p elc)) elc el)) file)))