GNU bug report logs -
#2499
doc fix for searching.texi
Previous Next
Reported by: tcr <at> freebits.de
Date: Fri, 27 Feb 2009 15:50:02 UTC
Severity: minor
Tags: fixed, notabug, patch
Fixed in version 24.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> > > > (i) `beginning-of-defun' is allowed to not save match data. If so,
> > > > please document it.
> > >
> > > 99.9% of the functions are allowed to not save match data.
> >
> > Oh, I didn't know that! I thought the policy was the other way
> > around. (Perhaps 34.6, The Match Data, should make this policy more
> > explicit. If so, and you say so, I'll prepare a patch.)
>
> Patch welcome.
Attached.
-T.
[match-data-lispref.diff (text/x-diff, inline)]
Index: doc/lispref/searching.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/lispref/searching.texi,v
retrieving revision 1.11
diff -u -r1.11 searching.texi
--- doc/lispref/searching.texi 8 Jan 2009 05:29:01 -0000 1.11
+++ doc/lispref/searching.texi 3 Mar 2009 20:48:30 -0000
@@ -1204,6 +1204,12 @@
can't avoid another intervening search, you must save and restore the
match data around it, to prevent it from being overwritten.
+ Notice that all functions are allowed to overwrite the match data
+unless they're explicitly documented not to do so. A consequence is that
+functions that are run implictly in the background (@pxref{Timers}, and
+@ref{Idle Timers}) should likely save and restore the match data
+explicitly.
+
@menu
* Replacing Match:: Replacing a substring that was matched.
* Simple Match Data:: Accessing single items of match data,
This bug report was last modified 14 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.