[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);
}
- feature/native-comp 47ab6c2 02/12: Add some testing for dynamic scope, (continued)
- feature/native-comp 47ab6c2 02/12: Add some testing for dynamic scope, Andrea Corallo, 2020/06/21
- feature/native-comp 29b2a08 03/12: Execute top level forms in the right lex/dyn scope., Andrea Corallo, 2020/06/21
- feature/native-comp decced8 04/12: Allow per function speed declaration, Andrea Corallo, 2020/06/21
- feature/native-comp 34117de 05/12: Add a test for speed -1, Andrea Corallo, 2020/06/21
- feature/native-comp 51df0ab 06/12: Do not native compile two functions to allow cc-mode hack, Andrea Corallo, 2020/06/21
- feature/native-comp 1179a1c 07/12: * Add a func-arity test for dynamic functions, Andrea Corallo, 2020/06/21
- feature/native-comp 89b6f56 09/12: * src/comp.c (Fcomp__compile_ctxt_to_file): Confine gcc optim level in [0, 3]., Andrea Corallo, 2020/06/21
- feature/native-comp cfb871a 08/12: * Handle correctly pure delaration specifier., Andrea Corallo, 2020/06/21
- feature/native-comp 0a70ed9 10/12: ; * src/comp.c (define_maybe_gc_or_quit): Fix a comment., Andrea Corallo, 2020/06/21
- feature/native-comp c324e02 12/12: Merge remote-tracking branch 'savahnna/master' into dev, Andrea Corallo, 2020/06/21
- feature/native-comp f0e9fdd 11/12: Two `load-history' eln related fixes.,
Andrea Corallo <=