aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-08-28 18:37:44 +0200
committerAndrea Corallo2020-08-29 11:34:00 +0200
commit696ab2eb17cf8850a65814f428287848b7d23d64 (patch)
tree7649d5639eead90eee960ad48b222352a7fb200d /src
parentc3514a6274cd6c6ddf2c133ccc708b7875aab90e (diff)
downloademacs-696ab2eb17cf8850a65814f428287848b7d23d64.tar.gz
emacs-696ab2eb17cf8850a65814f428287848b7d23d64.zip
* src/lread.c (Fload): Bind load-file-name to the .elc filename.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c6
1 files changed, 4 insertions, 2 deletions
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. */)
1477 same folder of their respective sources therfore not to break 1477 same folder of their respective sources therfore not to break
1478 packages we fake `load-file-name' here. The non faked 1478 packages we fake `load-file-name' here. The non faked
1479 version of it is `load-true-file-name'. */ 1479 version of it is `load-true-file-name'. */
1480 specbind (Qload_file_name, Fgethash (Ffile_name_nondirectory (found), 1480 Lisp_Object el_name = Fgethash (Ffile_name_nondirectory (found),
1481 Vcomp_eln_to_el_h, Qnil)); 1481 Vcomp_eln_to_el_h, Qnil);
1482 specbind (Qload_file_name,
1483 NILP (el_name) ? Qnil : concat2 (el_name, build_string ("c")));
1482 } 1484 }
1483 else 1485 else
1484 specbind (Qload_file_name, found); 1486 specbind (Qload_file_name, found);