all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65536: 30.0.50; replace-regexp-in-string documentation does not mention it saves match data
@ 2023-08-25 13:16 Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-25 14:18 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-25 13:16 UTC (permalink / raw)
  To: 65536

Not sure about this one, maybe I have overlooked something ...

The Emacs Lisp manual says:

   Notice that all functions are allowed to overwrite the match data
   unless they’re explicitly documented not to do so.

And in particular function `replace-regexp-in-string' could be
assumed to modify the match data, but it uses an explicit call to
`save-match-data' to not do so.

Maybe this should be explicitly documented in its doc string and/or
the Emacs Lisp manual ((elisp) Search and Replace) so that users of
the function can rely on that fact?





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-26  9:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 13:16 bug#65536: 30.0.50; replace-regexp-in-string documentation does not mention it saves match data Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-25 14:18 ` Eli Zaretskii
2023-08-25 15:26   ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-25 16:56     ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-26  6:09       ` Eli Zaretskii
2023-08-26  6:24         ` Ihor Radchenko
2023-08-26  8:40         ` Stefan Kangas
2023-08-26  9:09           ` Eli Zaretskii

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.