From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Unbalanced change hooks (part 2) Date: Sun, 31 Jul 2016 17:59:32 -0400 Message-ID: References: <20160731121642.GB2205@acm.fritz.box> <83a8gxq288.fsf@gnu.org> <20160731172804.GD2205@acm.fritz.box> <83vazlobh1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470002439 15065 80.91.229.8 (31 Jul 2016 22:00:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Jul 2016 22:00:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 01 00:00:25 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 1bTymW-0003rU-RA for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2016 00:00:24 +0200 Original-Received: from localhost ([::1]:40931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTymT-0002JV-2P for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2016 18:00:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTylt-0002JO-V9 for emacs-devel@gnu.org; Sun, 31 Jul 2016 17:59:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTyls-0005AE-6O for emacs-devel@gnu.org; Sun, 31 Jul 2016 17:59:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:25347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTyll-00057r-Kw; Sun, 31 Jul 2016 17:59:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/8t03mhcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQEHAgEfizqEIGUHhC0FnxeSFINZI4QUIoE0gUQBAQE X-IPAS-Result: A0A+FgA731xV/8t03mhcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQEHAgEfizqEIGUHhC0FnxeSFINZI4QUIoE0gUQBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="249844151" Original-Received: from 104-222-116-203.cpe.teksavvy.com (HELO pastel.home) ([104.222.116.203]) by ironport2-out.teksavvy.com with ESMTP; 31 Jul 2016 18:01:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5255464364; Sun, 31 Jul 2016 17:59:32 -0400 (EDT) In-Reply-To: <83vazlobh1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 31 Jul 2016 22:26:34 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:206292 Archived-At: >> I fully agree that if you only use before-change-functions (or only use >> after-change-functions), your hook function should see *all* changes. > The change in question is a replacement. Emacs implements > replacements by a deletion followed by an insertion. The question is: > do we need to call the before-change-functions for both the deletion > and the insertion, or do we need to call them only once for the > "replacement"? Either way is fine, according to my interpretation of "should see *all* changes". Stefan