unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Matt Armstrong <matt@rfc20.org>
Cc: 46915@debbugs.gnu.org
Subject: bug#46915: [PATCH] Remove unecessary change_req arg from overlays_at()
Date: Thu, 04 Mar 2021 15:49:01 +0200	[thread overview]
Message-ID: <835z27jagi.fsf@gnu.org> (raw)
In-Reply-To: <m21rcvy7lj.fsf@matts-mbp-2016.lan> (message from Matt Armstrong on Wed, 03 Mar 2021 18:29:28 -0800)

> From: Matt Armstrong <matt@rfc20.org>
> 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 <matt@mdeb>
> 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.





  reply	other threads:[~2021-03-04 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  2:29 bug#46915: [PATCH] Remove unecessary change_req arg from overlays_at() Matt Armstrong
2021-03-04 13:49 ` Eli Zaretskii [this message]
2021-03-04 20:03   ` Matt Armstrong
2021-03-04 21:24     ` Eli Zaretskii
2021-03-07  0:03       ` Matt Armstrong
2021-03-07  6:05         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835z27jagi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=46915@debbugs.gnu.org \
    --cc=matt@rfc20.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).