|
From: | Stefan Monnier |
Subject: | Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change c7a6601 1/5: undo-size can count number of boundaries. |
Date: | Fri, 18 Sep 2015 16:26:42 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> Because I am using it to provide a backdrop, default, automatically add > a boundary heuristic. Waiting for a boundary to be added defeats the point. I think we're misunderstanding each other. What I'm suggesting is to replace: if(NILP (Vundo_buffer_undoably_changed)){ Fset (Qundo_buffer_undoably_changed,Qt); safe_run_hooks (Qundo_first_undoable_change_hook); } with if (NILP (CAR (BVAR (current_buffer, undo_list))) safe_run_hooks (Qundo_first_undoable_change_hook); and do it right before we add something to the undo-list (so the test of undo_list indeed tells us if this is the first new change pushed since the last boundary). It should give us the same behavior but without the need for that variable. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |