From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> I think this statement is surprising
Agreed.=C2=A0 That's why we have to write it explicitly in the doc ;-)<= br>
> Taken literally, Elisp programmers need to surround even calls to
> `car' with `save-match-data' because the documentation of `car= '
> doesn't specify that it doesn't change the match data.
Indeed, there's also an expectation that "primitives" don'= ;t touch the
match-data.=C2=A0 It would be good to document it, tho it will take some wo= rk
to clarify what is meant by "primitive".
> "Notice that no functions are allowed to overwrite the match data= unless
> they're explicitly documented to do so."
> and then clean up existing documentation and add `save-match-data'= where
> appropriate.
That would imply adding save-match-data *everywhere*.=C2=A0 It's an eno= rmous
amount of work, can't be automated,
and c= omes with only two obvious results:
- our Elisp source code will be significantly larger.
- Emacs will be slower.