]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/lread.c (Fload): Bind load-file-name to the .elc filename.
authorAndrea Corallo <akrl@sdf.org>
Fri, 28 Aug 2020 16:37:44 +0000 (18:37 +0200)
committerAndrea Corallo <akrl@sdf.org>
Sat, 29 Aug 2020 09:34:00 +0000 (11:34 +0200)
src/lread.c

index 3d0de4956050894d4a9e37de94c2cf134da7caff..5b77868a63ba5ee887a7a7539f81039ed67de3fa 100644 (file)
@@ -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);