all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: ture@turepalsson.se, Stefan Monnier <monnier@iro.umontreal.ca>,
	41445@debbugs.gnu.org
Subject: bug#41445: 26.3; Query-replace triggers "match data clobbered by..."
Date: Sat, 23 May 2020 15:08:21 +0200	[thread overview]
Message-ID: <D8D00EAB-1078-488C-A3D4-64E9F370F618@acm.org> (raw)
In-Reply-To: <CAArVCkRKdP8YcyapOMa66p+HEvgK1XUA+xpq_rhg3UvZV-svQQ@mail.gmail.com>

23 maj 2020 kl. 14.37 skrev Philipp Stephani <p.stephani2@gmail.com>:

> "Notice that all functions are allowed to overwrite the match data
> unless they're explicitly documented not to do so."
> (Not that I like that statement, but it is current reality.)

Thanks for the reference. Nevertheless, functions do use save-match-data for the benefit of their callers every now and then. The practice is fairly widespread, more so for functions that are otherwise side-effect-free. It's a matter of reasonable expectation, not following the manual to the letter.

For that matter, there are few functions explicitly documented not to clobber the match data, not counting the automatically inserted statement for functions marked pure or side-effect-free.






  parent reply	other threads:[~2020-05-23 13:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  5:07 bug#41445: 26.3; Query-replace triggers "match data clobbered by..." Ture Pålsson
2020-05-22 10:46 ` Mattias Engdegård
2020-05-22 11:11   ` Eli Zaretskii
2020-05-22 11:16     ` Mattias Engdegård
2020-05-22 12:07       ` Eli Zaretskii
2020-05-22 12:21         ` Mattias Engdegård
2020-05-22 12:35           ` Eli Zaretskii
2020-05-23 11:36         ` Mattias Engdegård
2020-05-23 12:28           ` Eli Zaretskii
2020-05-23 12:37             ` Philipp Stephani
2020-05-23 13:07               ` Eli Zaretskii
2020-05-23 13:08               ` Mattias Engdegård [this message]
2020-05-23 13:36             ` Stefan Monnier
2020-05-23 15:43               ` Drew Adams
2020-05-27 14:31               ` Mattias Engdegård
2020-05-27 15:54                 ` 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

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

  git send-email \
    --in-reply-to=D8D00EAB-1078-488C-A3D4-64E9F370F618@acm.org \
    --to=mattiase@acm.org \
    --cc=41445@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.com \
    --cc=ture@turepalsson.se \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.