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: Sat, 6 Jan 2018 20:24:03 +0000 Message-ID: <20180106202403.GD23284@ACM> References: <20180103124543.GA5435@ACM> <20180104155111.GB6846@ACM> <20180104211154.GC6846@ACM> <20180106151839.GB23284@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1515270416 798 195.159.176.226 (6 Jan 2018 20:26:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2018 20:26:56 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 06 21:26:52 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 1eXv3G-00083f-RB for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 21:26:46 +0100 Original-Received: from localhost ([::1]:49140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXv5G-0001Bk-BZ for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 15:28:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXv4x-00015a-Nj for emacs-devel@gnu.org; Sat, 06 Jan 2018 15:28:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXv4u-0000xo-Jt for emacs-devel@gnu.org; Sat, 06 Jan 2018 15:28:31 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:18138 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eXv4u-0000wn-7q for emacs-devel@gnu.org; Sat, 06 Jan 2018 15:28:28 -0500 Original-Received: (qmail 34467 invoked by uid 3782); 6 Jan 2018 20:28:26 -0000 Original-Received: from acm.muc.de (p548C6CC7.dip0.t-ipconnect.de [84.140.108.199]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 06 Jan 2018 21:28:26 +0100 Original-Received: (qmail 20930 invoked by uid 1000); 6 Jan 2018 20:24:03 -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:221648 Archived-At: Hello, Stefan. On Sat, Jan 06, 2018 at 10:51:30 -0500, Stefan Monnier wrote: > > I've found a discrepancy. Just one. In (transpose-regions 1 10 11 20), > > the hook calls are, in order, ((1 10) (11 20) (1 20 19)). The two > > consecutive b-c-f's happen when the two regions are of equal size and > > non-contiguous. > Sounds like a bug alright. > > The cause of this is not hard to find: in Ftranspose_region, editfns.c > > L5204, there are two calls to modify_text on consecutive lines. This > > seems to be some sort of optimisation. It is not done elsewhere in > > Ftranspose_region. I dare say this could be fixed easily. > Feel free to fix it (on master). Done. [ .... ] > Stefan -- Alan Mackenzie (Nuremberg, Germany).