From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining] Date: Tue, 30 Aug 2016 17:42:24 +0000 Message-ID: <20160830174223.GB6672@acm.fritz.box> References: <7e1478b6-cf00-fcbf-8c24-43bdaa57e2b6@dancol.org> <415d1cca-f32c-624e-a4be-9aadcf8a0f17@dancol.org> <83inujbpek.fsf@gnu.org> <20160830171222.GA6672@acm.fritz.box> <83inuimajv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1472579018 4490 195.159.176.226 (30 Aug 2016 17:43:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2016 17:43:38 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: dancol@dancol.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 30 19:43:34 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ben4M-0000IE-LS for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2016 19:43:30 +0200 Original-Received: from localhost ([::1]:50450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ben4J-0007wY-Ji for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2016 13:43:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ben3n-0007vm-FS for emacs-devel@gnu.org; Tue, 30 Aug 2016 13:42:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ben3j-0004Yi-Fl for emacs-devel@gnu.org; Tue, 30 Aug 2016 13:42:55 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:33731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ben3j-0004YZ-5b for emacs-devel@gnu.org; Tue, 30 Aug 2016 13:42:51 -0400 Original-Received: (qmail 23800 invoked by uid 3782); 30 Aug 2016 17:42:49 -0000 Original-Received: from acm.muc.de (p548C605C.dip0.t-ipconnect.de [84.140.96.92]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Aug 2016 19:42:48 +0200 Original-Received: (qmail 6939 invoked by uid 1000); 30 Aug 2016 17:42:24 -0000 Content-Disposition: inline In-Reply-To: <83inuimajv.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206977 Archived-At: Hello, Eli. On Tue, Aug 30, 2016 at 08:27:48PM +0300, Eli Zaretskii wrote: > > Date: Tue, 30 Aug 2016 17:12:22 +0000 > > Cc: Daniel Colascione , monnier@iro.umontreal.ca, > > emacs-devel@gnu.org > > From: Alan Mackenzie > > > You are welcome to suggest more accurate wording that describes the > > > current implementation. > > I think it's only fair to point out that I did precisly this almost > > three weeks ago (on 2016-08-10) and the welcome my efforts got was > > somewhat less than wholeheartedly warm. > Your attempt didn't describe the current implementation. It described > what you thought it should be. The text in question (intended for the Elisp manual) was: Normally the before-change-functions and the after-change-functions hooks are called in balanced pairs around each buffer change, enabling state to be determined in a before-change function and used in an after-change function. However on rare occasions, before-change-functions is not called before a buffer change and after-change-functions is thus called twice in succession. Your program should be ready to deal with such an occurrence. The crucial part of that is the first sentence. It is true. The second sentence is true in essence, though it possibly needs to be made more accurate to deal with other cases. -- Alan Mackenzie (Nuremberg, Germany).