emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp f0e9fdd 11/12: Two `load-history' eln related fixes.


From: Andrea Corallo
Subject: feature/native-comp f0e9fdd 11/12: Two `load-history' eln related fixes.
Date: Sun, 21 Jun 2020 18:37:18 -0400 (EDT)

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

    Two `load-history' eln related fixes.
    
        * src/lread.c (Fload): Fix `load-history' filling for elns non in
        root lisp-dir.
    
        * lisp/startup.el (command-line): Fix `load-history' fixup
        algorith for eln files.
---
 lisp/startup.el | 7 ++++++-
 src/lread.c     | 3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index bff1000..e58f27e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1061,7 +1061,12 @@ please check its value")
          (unless (file-readable-p lispdir)
            (princ (format "Lisp directory %s not readable?" lispdir))
            (terpri)))
-      (setq lisp-dir (file-truename (file-name-directory simple-file-name)))
+      (setq lisp-dir
+            (file-truename
+             (if (string-match "\\.eln\\'" simple-file-name)
+                 (expand-file-name
+                  (concat (file-name-directory simple-file-name) "../"))
+               (file-name-directory simple-file-name))))
       (setq load-history
            (mapcar (lambda (elt)
                      (if (and (stringp (car elt))
diff --git a/src/lread.c b/src/lread.c
index 0530848..f5a7d44 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1506,7 +1506,8 @@ Return t if the file exists and loads successfully.  */)
       specbind (Qcurrent_load_list, Qnil);
       if (!NILP (Vpurify_flag))
        {
-         Lisp_Object base = parent_directory (Ffile_name_directory (found));
+         Lisp_Object base = concat2 (parent_directory (Vinvocation_directory),
+                                     build_string ("lisp/"));
          Lisp_Object offset = Flength (base);
          hist_file_name = Fsubstring (found, offset, Qnil);
        }



reply via email to

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