diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-02-04 12:58:56 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-02-04 12:58:56 -0500 |
commit | 52abeaf1333427f156a23f0acf057e81bcc5e9e2 (patch) | |
tree | ea7ef0e7c69edb11103ac6e8e0f2415171ba5284 /src/lread.c | |
parent | a1aa9028f83e5d3da71bdb5877d8baa5d6c1e98a (diff) | |
download | emacs-52abeaf1333427f156a23f0acf057e81bcc5e9e2.tar.gz |
* src/lread.c (build_load_history): Be careful with in-place updates
Don't leave a "broken" value in `Vcurrent_load_list`.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index cc55b009ab9..b1b109315f9 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2369,8 +2369,14 @@ 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) - Vload_history = Fcons (Fnreverse (Vcurrent_load_list), - Vload_history); + { + Lisp_Object tem = Fnreverse (Vcurrent_load_list); + eassert (EQ (filename, Fcar (tem))); + Vload_history = Fcons (tem, Vload_history); + /* FIXME: There should be an unbind_to right after calling us which + should re-establish the previous value of Vcurrent_load_list. */ + Vcurrent_load_list = Qt; + } } static void |