[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: Tue, 17 Nov 2015 14:09:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Did you take a look at subst-char-in-region?  It calls
> prepare_to_modify_buffer from within a loop which seems to assume that
> (a) gap position doesn't move, and (b) that pointer into buffer text
> is valid across the call to prepare_to_modify_buffer.  GC could
> invalidate both assumptions, no?
> Bottom line: I think all the functions that manipulate the gap should
> be carefully audited to identify any potential problem with this
> approach.

prepare_to_modify_buffer runs before-change-functions, so it's been
running Elisp code for many years.  Maybe there are still problems
lurking, but I'm not too worried and they'd have to be fixed regardless
of what we do with run_undoable_change.


reply via email to

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