]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (combine-change-calls-1): Fix bug#60467
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 13 Jan 2023 22:38:04 +0000 (17:38 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 13 Jan 2023 22:38:04 +0000 (17:38 -0500)
Don't stop at timestamps.  Strip them for now, to be on the safe side.
Don't merge into `master` where we'll use a better fix.

lisp/subr.el

index 485ca9e4f1b0c5394eb58c52c9e367ea72278006..ab451b5613b9098b21e74035c9dbad6a6141ea35 100644 (file)
@@ -4946,13 +4946,13 @@ the function `undo--wrap-and-run-primitive-undo'."
                (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)))))
-                   (setq ptr (cdr ptr)))
+                             (cdr ptr))
+                   (if (and (consp (cdr ptr))
+                            (consp (cadr ptr))
+                            (eq (caadr ptr) t))
+                       ;; 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"))
                  (setcdr ptr nil)