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