scratch/igc/weak-undo-list 195d68f1013: * src/undo.c (scrub_undo_list): If possible, avoid mutation.
Helmut Eller <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: scratch/igc/weak-undo-list commit 195d68f10131e10751bdb876d1aca4ff83e641ce Author: Helmut Eller <[email protected]> Commit: Helmut Eller <[email protected]> * src/undo.c (scrub_undo_list): If possible, avoid mutation. --- src/undo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/undo.c b/src/undo.c index a1af187567e..5487121fe40 100644 --- a/src/undo.c +++ b/src/undo.c @@ -193,7 +193,8 @@ scrub_undo_list (Lisp_Object list) Lisp_Object head = Fnthcdr (make_fixnum (4), entry); Lisp_Object pairs = scrub_id_offset_pairs (htab, XCDR (head)); - XSETCDR (head, pairs); + if (pairs != XCDR (head)) + XSETCDR (head, pairs); drop = NILP (pairs); } if (drop)