From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: transpose-regions Date: Fri, 23 Mar 2007 14:00:18 -0400 Message-ID: References: <46026277.7060305@gmx.at> <87zm64kau0.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1174673108 23585 80.91.229.12 (23 Mar 2007 18:05:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 18:05:08 +0000 (UTC) Cc: rudalics@gmx.at, cyd@stupidchicken.com, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 19:04:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HUo88-0006IW-HA for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 19:04:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUoA3-0000sp-OA for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 13:06:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUo7j-0000XR-4c for emacs-devel@gnu.org; Fri, 23 Mar 2007 14:04:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUo7i-0000Va-EF for emacs-devel@gnu.org; Fri, 23 Mar 2007 14:04:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUo7i-0000VQ-5A for emacs-devel@gnu.org; Fri, 23 Mar 2007 13:04:22 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUo5m-00032J-4X for emacs-devel@gnu.org; Fri, 23 Mar 2007 14:02:22 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HUo3m-0001aB-FP; Fri, 23 Mar 2007 14:00:18 -0400 In-reply-to: (message from Andreas Schwab on Fri, 23 Mar 2007 11:55:48 +0100) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68426 Archived-At: 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.