* src/undo.c (scrub_undo_list): If possible, avoid mutation.

This commit is contained in:
Helmut Eller 2026-06-15 22:33:30 +02:00
parent 8f04fd5d86
commit 195d68f101

View file

@ -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)