From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46915: [PATCH] Remove unecessary change_req arg from overlays_at() Date: Thu, 04 Mar 2021 15:49:01 +0200 Message-ID: <835z27jagi.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46915@debbugs.gnu.org To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 04 14:50:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHoMl-0008AR-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 14:50:11 +0100 Original-Received: from localhost ([::1]:60166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHoMk-0005X0-Od for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 08:50:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHoMc-0005Ul-7k for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 08:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHoMb-0005wz-UL for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 08:50:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHoMb-00056m-RO for bug-gnu-emacs@gnu.org; Thu, 04 Mar 2021 08:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Mar 2021 13:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46915-submit@debbugs.gnu.org id=B46915.161486577019579 (code B ref 46915); Thu, 04 Mar 2021 13:50:01 +0000 Original-Received: (at 46915) by debbugs.gnu.org; 4 Mar 2021 13:49:30 +0000 Original-Received: from localhost ([127.0.0.1]:58145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHoM5-00055j-UO for submit@debbugs.gnu.org; Thu, 04 Mar 2021 08:49:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHoM4-00055V-BY for 46915@debbugs.gnu.org; Thu, 04 Mar 2021 08:49:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59388) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHoLv-0005eY-5n; Thu, 04 Mar 2021 08:49:22 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lHoLu-0002mB-7e; Thu, 04 Mar 2021 08:49:18 -0500 In-Reply-To: (message from Matt Armstrong on Wed, 03 Mar 2021 18:29:28 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201393 Archived-At: > From: Matt Armstrong > Date: Wed, 03 Mar 2021 18:29:28 -0800 > > I was scratching my head trying to figure out why overlays_at() had such > a complex function signature. It turns out that it does not need to be > so complex now and, I think, it never did. > > >From 0337e4823b32dd15bdae1f61df12b5f68170e360 Mon Sep 17 00:00:00 2001 > From: Matt Armstrong > Date: Wed, 3 Mar 2021 16:31:02 -0800 > Subject: [PATCH] Remove unecessary change_req arg from overlays_at() > > The change_req arg was an unecessary complexity. It only changed what > might be assigned to the *prev_ptr arg, and all callers that passed a > non-null prev_ptr also passed a true change_req. > > This makes it clear that no caller desires the behavior that would > have occurred with a non-null prev_ptr and a false change_req. > > For archaeologists, the above invariants appear to have been true from > the beginning, and whatever bug fixed by the commits below need not > have been controlled with a new boolean arg. See commits > ac869cf715 ((overlays_at): Add CHANGE_REQ parameter, 2000-08-08) and > 1d5f4c1de4 ((overlays_at): Only let CHANGE_REQ inhibit an assignment > of startpos to prev when startpos == pos, 2000-10-25). Could you please tell what are the benefits of this change? The signature may be complex, but it doesn't currently cause any problems, does it? I'd prefer not to change code that is working and causes no trouble. Thanks.