* lisp/subr.el (combine-change-calls-1): Fix bug#60467
Don't stop at timestamps. Also Don't burp about breakage just because (cdr old-bul) is nil.
This commit is contained in:
parent
f32ce2e38c
commit
977630b528
1 changed files with 8 additions and 9 deletions
17
lisp/subr.el
17
lisp/subr.el
|
@ -4966,21 +4966,20 @@ the function `undo--wrap-and-run-primitive-undo'."
|
|||
beg
|
||||
(marker-position end-marker)
|
||||
#'undo--wrap-and-run-primitive-undo
|
||||
beg (marker-position end-marker) buffer-undo-list))
|
||||
beg (marker-position end-marker)
|
||||
;; We will truncate this list by side-effect below.
|
||||
buffer-undo-list))
|
||||
(ptr buffer-undo-list))
|
||||
(if (not (eq buffer-undo-list old-bul))
|
||||
(progn
|
||||
(while (and (not (eq (cdr ptr) old-bul))
|
||||
;; In case garbage collection has removed OLD-BUL.
|
||||
(cdr ptr)
|
||||
;; Don't include a timestamp entry.
|
||||
(not (and (consp (cdr ptr))
|
||||
(consp (cadr ptr))
|
||||
(eq (caadr ptr) t)
|
||||
(setq old-bul (cdr ptr)))))
|
||||
(or (cdr ptr)
|
||||
(progn
|
||||
(message "combine-change-calls: buffer-undo-list broken")
|
||||
nil)))
|
||||
(setq ptr (cdr ptr)))
|
||||
(unless (cdr ptr)
|
||||
(message "combine-change-calls: buffer-undo-list broken"))
|
||||
;; Truncate the list that's in the `apply' entry.
|
||||
(setcdr ptr nil)
|
||||
(push ap-elt buffer-undo-list)
|
||||
(setcdr buffer-undo-list old-bul)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue