emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 696ab2e 2/6: * src/lread.c (Fload): Bind load-file-n


From: Andrea Corallo
Subject: feature/native-comp 696ab2e 2/6: * src/lread.c (Fload): Bind load-file-name to the .elc filename.
Date: Sat, 29 Aug 2020 10:20:50 -0400 (EDT)

branch: feature/native-comp
commit 696ab2eb17cf8850a65814f428287848b7d23d64
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * src/lread.c (Fload): Bind load-file-name to the .elc filename.
---
 src/lread.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index 3d0de49..5b77868 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]