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: Bugs in remove-list-of-text-properties and a patch [WAS: before-change-functions called twice at yank] Date: Mon, 17 Apr 2006 21:42:16 -0400 Message-ID: References: <443ADE3B.7000800@soem.dk> <444141FF.9000007@soem.dk> <44435682.4050409@soem.dk> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1145324666 16122 80.91.229.2 (18 Apr 2006 01:44:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2006 01:44:26 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 18 03:44:24 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVfGN-0005X2-Bh for ged-emacs-devel@m.gmane.org; Tue, 18 Apr 2006 03:44:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVfGM-0007I6-SW for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2006 21:44:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FVfER-0006QL-Cl for emacs-devel@gnu.org; Mon, 17 Apr 2006 21:42:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FVfEQ-0006PN-7V for emacs-devel@gnu.org; Mon, 17 Apr 2006 21:42:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVfEP-0006P8-GJ for emacs-devel@gnu.org; Mon, 17 Apr 2006 21:42:18 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FVfFB-0008Kl-BD for emacs-devel@gnu.org; Mon, 17 Apr 2006 21:43:05 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FVfEO-0003qS-2M; Mon, 17 Apr 2006 21:42:16 -0400 Original-To: Lars Hansen In-reply-to: <44435682.4050409@soem.dk> (message from Lars Hansen on Mon, 17 Apr 2006 10:49:06 +0200) 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:52989 Archived-At: The general idea is: Fremove_list_of_text_properties has a for (;;) loop that loops over the parts of the interval. It updates the flag `modified' recording if changes have been done. To make things work right, we must call modify_region before calling remove_properties iff modified == 0, and we must call signal_after_change before returning iff modified != 0. Would you please add that explanation as a comment? And maybe this one too: The before-change-functions are run by modify_region called immediately before the changes are done by remove_properties.