Document the new undo-list entry kind

* src/buffer.c (buffer-undo-list): Update the docstring.
* doc/lispref/text.texi (buffer-undo-list): Describe the new entry kind.
This commit is contained in:
Helmut Eller 2026-08-07 20:42:07 +02:00
parent cc0f94f357
commit 4281de8bcd
2 changed files with 13 additions and 0 deletions

View file

@ -1449,6 +1449,13 @@ arguments @var{args}.
This kind of element enables undo limited to a region to determine
whether the element pertains to that region.
@item (apply @var{delta} (@var{beg} . @var{end}) @var{funname} . @var{args})
This kind of element is similar to the previous form. The difference is
that @var{funname} is invoked with @w{@code{(apply @var{funname}
@var{beg2} @var{end2} @var{args})}}, where @var{beg2} and @var{end2} are
the adjusted values of @var{beg} and @var{end}. The function can use
those arguments to compute positions relative to the adjusted region.
@item nil
This element is a boundary. The elements between two boundaries are
called a @dfn{change group}; normally, each change group corresponds to

View file

@ -5762,6 +5762,12 @@ in the active region. BEG and END is the range affected by this entry
and DELTA is the number of characters added or deleted in that range by
this change.
An entry (apply DELTA (BEG . END) FUN-NAME . ARGS) is similar to the
previous kind. The difference is that Emacs invokes FUN-NAME with
\(apply FUN-NAME BEG2 END2 ARGS), where BEG2 and END2 are the adjusted
values of BEG and END. The function can use those arguments to compute
positions relative to the adjusted region.
An entry (MARKER . DISTANCE) indicates that the marker MARKER
was adjusted in position by the offset DISTANCE (an integer).