Update Android port

* lisp/loadup.el (current-load-list): Set to empty load list
after startup.
* src/lread.c (build_load_history): Revert earlier changes.
This commit is contained in:
Po Lu 2023-03-16 09:40:02 +08:00
parent 9a4a7de914
commit d04731b588
2 changed files with 10 additions and 11 deletions

View file

@ -666,6 +666,13 @@ lost after dumping")))
(setq load-file-name nil)
(eval top-level t)
;; loadup.el is loaded at startup, but clobbers current-load-list.
;; Set current-load-list to a list containing no definitions and only
;; its name, to prevent invalid entries from ending up in
;; Vload_history when running temacs interactively.
(setq current-load-list (list "loadup.el"))
;; Local Variables:
;; no-byte-compile: t

View file

@ -2317,7 +2317,7 @@ static void
build_load_history (Lisp_Object filename, bool entire)
{
Lisp_Object tail, prev, newelt;
Lisp_Object tem, tem2, association;
Lisp_Object tem, tem2;
bool foundit = 0;
tail = Vload_history;
@ -2366,16 +2366,8 @@ build_load_history (Lisp_Object filename, bool entire)
front of load-history, the most-recently-loaded position. Also
do this if we didn't find an existing member for the file. */
if (entire || !foundit)
{
association = Fnreverse (Vcurrent_load_list);
if (!NILP (association) && STRINGP (XCAR (association)))
/* readevalloop can be called with SOURCENAME set to some
nonsense value, meaning the car of ASSOCIATION will be nil
(or worse something else), leading to an invalid
Vload_history. Ignore such invalid entries. */
Vload_history = Fcons (association, Vload_history);
}
Vload_history = Fcons (Fnreverse (Vcurrent_load_list),
Vload_history);
}
static void