]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (combine-change-calls-1): Fix bug#64989
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Aug 2023 16:12:42 +0000 (12:12 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 28 Aug 2023 16:12:42 +0000 (12:12 -0400)
Silence the spurious warning, and improve the warning while at it.
Do not merge to master.

lisp/subr.el

index 28473f1d38c127262e843511b6b04fa343a48f2d..3ad57eeef2ae30b2728c11e19a5592684a83243a 100644 (file)
@@ -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)))))