[Top][All Lists]

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

Re: Calling Lisp from undo.c's record_* functions

From: Eli Zaretskii
Subject: Re: Calling Lisp from undo.c's record_* functions
Date: Tue, 17 Nov 2015 19:05:36 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Tue, 17 Nov 2015 11:49:04 -0500
> >> But of course, in reality it's not the whole record_insert that needs to
> >> be moved, only the run_undoable_change within it.
> >> So if it's difficult to move record_insert to safe spot, maybe we should
> >> take run_undoable_change out of it.
> >> E.g. maybe we could call run_undoable_change from
> >> prepare_to_modify_buffer instead.
> > Beware: prepare_to_modify_buffer is not always called.
> When would it not be called?

E.g., in insert_from_gap.  Also, in many insdel.c functions when they
are called with the PREPARE argument false.

> You mean there are cases where we'd add stuff to the undo list but
> we don't run before-change-functions?

I don't know.  I don't think we have such bugs, but thinking is one
thing and convincing yourself it's true by looking at the callers is
something entirely different...

reply via email to

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