Subject: 29.0.50; failing to load .eln for init file sets user-init-file to warnings.el
From: Juanma Barranquero <[email-masked]>
To: Bug-Gnu-Emacs <[email-masked]>
Date: Fri, 18 Nov 2022 14:17:36 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

If you use ~/.emacs instead of ~.emacs.d/init.el, and happen to compile
.emacs, Emacs loads .emacs.elc (as it has always done), but the native
compiler does *not* know how to compile it (because it does not know how to
locate its source), so it gives a warning:

022-11-18 02:54:01+0100 Warning (comp): Cannot look up eln file as no
source file was found for d:/Home/.emacs.elc

and then it assigns the user-init-file to the native-compiled warnings.el,

"d:/Home/.emacs.d/native/29.0.50-a4a10996/warnings-28e75f4d-02da775e.eln"

which now, with the fix for bug#59334, ends up pointing to warnings.el:

ELISP> user-init-file
"d:/Devel/emacs/repo/trunk/lisp/emacs-lisp/warnings.el"