[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: Thu, 19 Nov 2015 19:58:26 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden (Phillip Lord), Richard Stallman <address@hidden>,
>         address@hidden
> Date: Thu, 19 Nov 2015 12:49:57 -0500
> > 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.

> So we don't really have a choice here.

There's always a choice.

reply via email to

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