]> git.eshelyaron.com Git - emacs.git/commitdiff
Further locate-file fixes on nativecomp
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Mar 2022 21:54:28 +0000 (22:54 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Mar 2022 21:54:38 +0000 (22:54 +0100)
* lisp/files.el (locate-file): Fix up previous locate-file change
-- don't unconditionally return .elc on nativecomp.

lisp/files.el

index 327375ddaa468689c6fae2c93b79dd06858c4a55..7be93662b1c99727f27328a892fc10a3777bf289 100644 (file)
@@ -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)))