unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 0724c6dbdae: Use string-search instead of string-match[-p] when possible
Date: Wed, 29 Mar 2023 17:54:04 +0200	[thread overview]
Message-ID: <871ql7mu3n.fsf@gmail.com> (raw)
In-Reply-To: <8C045DB0-F4B5-4469-8BA6-F838F6DBE755@acm.org> ("Mattias Engdegård"'s message of "Wed, 29 Mar 2023 17:34:36 +0200")

>>>>> On Wed, 29 Mar 2023 17:34:36 +0200, Mattias Engdegård <mattiase@acm.org> said:

    Mattias> 29 mars 2023 kl. 17.23 skrev Robert Pluim <rpluim@gmail.com>:
    >> Hmm, we could do this using a compiler macro, no? Something like
    >> 
    >> (put 'string-match-p 'compiler-macro
    >> #'byte-optimize-string-match-p)

    Mattias> No, that would be incorrect: string-match-p obeys case-fold-search, string-search doesn't.

Right, Iʼd forgotten about that. And a warning would be a bit
intrusive, I think.

    Mattias> Replacing string-match[-p] with string-search in the source also makes the code clearer.

Thatʼs definitely true.

Robert
-- 



      reply	other threads:[~2023-03-29 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167982767456.13549.3313290435008922358@vcs2.savannah.gnu.org>
     [not found] ` <20230326104755.356B1C1391D@vcs2.savannah.gnu.org>
2023-03-26 23:05   ` master 0724c6dbdae: Use string-search instead of string-match[-p] when possible Dmitry Gutov
2023-03-26 23:35     ` Emanuel Berg
2023-03-27  4:58       ` Yuan Fu
2023-03-27 12:47     ` Mattias Engdegård
2023-03-29 15:23   ` Robert Pluim
2023-03-29 15:34     ` Mattias Engdegård
2023-03-29 15:54       ` Robert Pluim [this message]

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=871ql7mu3n.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.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).