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: Lisp primitives and their calling of the change hooks Date: Wed, 10 Jan 2018 19:48:39 +0000 Message-ID: <20180110194839.GC6175@ACM> References: <20180107194845.GE22254@ACM> <838td98mqe.fsf@gnu.org> <20180107211055.GF22254@ACM> <837est81bl.fsf@gnu.org> <20180108192415.GA5531@ACM> <83h8rw6oio.fsf@gnu.org> <20180109195357.GA3869@ACM> <20180110184521.GB6175@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1515613997 9020 195.159.176.226 (10 Jan 2018 19:53:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 19:53:17 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 10 20:53:13 2018 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 1eZMQm-0001Ao-Ec for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 20:53:00 +0100 Original-Received: from localhost ([::1]:35821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZMSk-0005Zm-Et for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 14:55:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZMRb-0004zQ-7X for emacs-devel@gnu.org; Wed, 10 Jan 2018 14:53:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZMRX-0003xc-RN for emacs-devel@gnu.org; Wed, 10 Jan 2018 14:53:50 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:12406 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eZMRX-0003tX-KU for emacs-devel@gnu.org; Wed, 10 Jan 2018 14:53:47 -0500 Original-Received: (qmail 63105 invoked by uid 3782); 10 Jan 2018 19:53:45 -0000 Original-Received: from acm.muc.de (p548C7214.dip0.t-ipconnect.de [84.140.114.20]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 10 Jan 2018 20:53:44 +0100 Original-Received: (qmail 6736 invoked by uid 1000); 10 Jan 2018 19:48:39 -0000 Content-Disposition: inline In-Reply-To: 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 [fuzzy] X-Received-From: 193.149.48.1 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:221809 Archived-At: Hello, Stefan. On Wed, Jan 10, 2018 at 14:30:12 -0500, Stefan Monnier wrote: > > It's debatable whether it's within the rules or not. The rules, which > > we so carefully crafted a few days ago, say, in part; "The arguments to > > `before-change-functions' will enclose a region in which the individual > > changes are made, ...". There will never be any changes made in the > > quasi-deleted region, so to leave it without a balanceing a-c-f call > > could be construed as against the rules. > If so we should clarify the rules to allow for it. Why? I mean, why should we allow this? What does it gain us? > `upcase-region` will call b-c-f before knowing whether any char will > be upcased, and I think we do want to allow that kind of behavior. At the moment, non-balancing b/a-c-f are used only in primitives which can't change the length of the buffer - things like translate-region-internal and upcase-region. There might well be advantages in keeping things that way, there surely are no disadvantages. Non-balanced change hooks necessitate special handling. > Stefan -- Alan Mackenzie (Nuremberg, Germany).