[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: Stefan Monnier
Subject: Re: Calling Lisp from undo.c's record_* functions
Date: Thu, 19 Nov 2015 13:17:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> > prepare_to_modify_buffer.  This seems to avoid calling Lisp while the
>> > gap is being manipulated, but my question is: are there any pitfalls
>> > to calling Lisp code on the level of insdel.c functions?  I'd like to
>> > hear your opinion before we decide whether to install the proposed
>> > solution, or look for a safer one.
>> As mentioned earlier, this function has been running Elisp code forever
>> already via the before-change-functions hook.
> That is true, but unlike before-change-functions, which is not always
> non-nil, the undo-related call will always be run.  So if calling Lisp
> there could cause some problems, those problems will become much more
> frequent now.

That's true.  So we may uncover bugs.

Since those bugs would presumably also exist when
before-change-functions is non-nil, we'd have to find a solution for
before-change-functions and that solution would probably also be
applicable to run_undoable_changes.


reply via email to

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