summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c
index 937b4566851..18a56d0969c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1469,6 +1469,11 @@ Return t if the file exists and loads successfully. */)
if (is_native_elisp)
{
+ /* Many packages use `load-file-name' as a way to obtain the
+ package location (see bug#40099). .eln files are not in the
+ 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'. */
Lisp_Object dir = Ffile_name_directory (found);
Lisp_Object parent_dir =
Ffile_name_directory (Fsubstring (dir,