emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change e5ff57


From: Stefan Monnier
Subject: Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change e5ff575 2/2: Add a timer to ensure undo-boundaries in buffers.
Date: Sat, 29 Aug 2015 23:30:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> +(defun undo-ensure-boundary ()
> +  "Add an `undo-boundary' if `buffer-undo-list' is long.
> +
> +Return t if an undo boundary has been added.
> +
> +Normally, Emacs will only garbage collect data from
> +`buffer-undo-list' when this list is longer than `undo-limit'. It
> +then collects data from after the first `undo-boundary' after
> +`undo-limit'. If there are no boundaries in the list,
> +`buffer-undo-list' will grow until it reaches
> +`undo-outer-limit' (by default a much larger value than
> +`undo-limit'), when it will discard the data anyway. In this
> +case, however, it is treated as an exceptional case, and the a
> +warning is signalled.
> +
> +This function add an `undo-boundary' to `buffer-undo-list' if
> +there is no other `undo-boundary', and `buffer-undo-list' is
> +longer than `undo-limit'. It provides a useful default mechanism
> +for adding an `undo-boundary' which retains data where possible,
> +without signalling warnings to the user."

I think this makes sense, but we should do it in the GC code, then.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]