emacs-devel
[Top][All Lists]
Advanced

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

Re: transpose-regions


From: Richard Stallman
Subject: Re: transpose-regions
Date: Fri, 23 Mar 2007 14:00:18 -0400

      The function uses
    the local variables tmp_interval[12] that are copies of the buffer
    intervals, perhaps they need to be protected from GC?

The intervals need to be protected if Lisp code can be called.  But
this can't be done in the usual way, because intervals are not Lisp
objects and not recognizable by GC.  GC knows when it is marking an
interval because it found the pointer in a string or buffer.  GCPROing
these slots in the normal way will not work.

It seems to me that the only thing that can GC in the code
where tmp_interval is in use is Fset_text_properties.
Calling set_text_properties_1 instead would avoid running hooks.
Then no GC could occur.  Does anyone see an error in this conclusion?

Ftranslate_regions is supposed to run the usual hooks for modifying
the buffer.  I suspect it does not run them properly in all cases now.
I suggest calling these hooks explicitly at the beginning and the end.




reply via email to

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