(track-changes--after): Fix problem found in bug#73041
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 17 Oct 2024 15:39:19 +0000 (11:39 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 17 Oct 2024 15:39:19 +0000 (11:39 -0400)
commit90c6880a922029ba6e57adb2afe00a6fa57ef7fe
tree963171929e400321970854d9fd9aa129523e6da7
parentd3c94102266fa1fe167f699a92b9064c02b63d4f
(track-changes--after): Fix problem found in bug#73041

When calling `track-changes--before` (e.g. because of a missing
b-f-c or for some other reason), it sets `track-changes--before-end`
to the right value so we shouldn't increment it right after.
Also, we should update `track-changes--buffer-size` before
calling `track-changes--before` so it doesn't risk signaling
a spurious inconsistency.

* lisp/emacs-lisp/track-changes.el (track-changes--after):
Update `track-changes--buffer-size` earlier, and don't increment
`track-changes--before-end` when we call `track-changes--before`.
lisp/emacs-lisp/track-changes.el