From f26622b2a470a6d9cfbabbaa96f6aa3966febf2f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 28 Aug 2023 12:12:42 -0400 Subject: [PATCH] * lisp/subr.el (combine-change-calls-1): Fix bug#64989 Silence the spurious warning, and improve the warning while at it. Do not merge to master. --- lisp/subr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 28473f1d38c..3ad57eeef2a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -5002,8 +5002,8 @@ the function `undo--wrap-and-run-primitive-undo'." ;; Don't include a timestamp entry. (setcdr ptr (cddr ptr)) (setq ptr (cdr ptr)))) - (unless (cdr ptr) - (message "combine-change-calls: buffer-undo-list broken")) + (unless (or (cdr ptr) (null old-bul)) + (message "combine-change-calls: buffer-undo-list presumably truncated by GC")) (setcdr ptr nil) (push ap-elt buffer-undo-list) (setcdr buffer-undo-list old-bul))))) -- 2.39.2