From: Andrea Corallo Date: Fri, 28 Aug 2020 16:37:44 +0000 (+0200) Subject: * src/lread.c (Fload): Bind load-file-name to the .elc filename. X-Git-Tag: emacs-28.0.90~2727^2~473 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=696ab2eb17cf8850a65814f428287848b7d23d64;p=emacs.git * src/lread.c (Fload): Bind load-file-name to the .elc filename. --- diff --git a/src/lread.c b/src/lread.c index 3d0de495605..5b77868a63b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1477,8 +1477,10 @@ Return t if the file exists and loads successfully. */) same folder of their respective sources therfore not to break packages we fake `load-file-name' here. The non faked version of it is `load-true-file-name'. */ - specbind (Qload_file_name, Fgethash (Ffile_name_nondirectory (found), - Vcomp_eln_to_el_h, Qnil)); + Lisp_Object el_name = Fgethash (Ffile_name_nondirectory (found), + Vcomp_eln_to_el_h, Qnil); + specbind (Qload_file_name, + NILP (el_name) ? Qnil : concat2 (el_name, build_string ("c"))); } else specbind (Qload_file_name, found);