[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-noselect needs save-match-data

From: Stefan Monnier
Subject: Re: find-file-noselect needs save-match-data
Date: Wed, 06 Jun 2007 08:14:14 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Following your opinion, I conclude that it's type-break's
> responsibility to know `find-file-noselect' uses regexps and so it
> should use `save-match-data' when placing it to `post-command-hook'.
> While the name `find-file-noselect' does not indicate it uses regexps,
> and so does its document, it is more or less not appropriate of this
> conclusion to me.

99% of non-trivial functions use regexps.  So you cannot assume a function
doesn't use regexps just because it doesn't say that it uses regexps.
It's rather the opposite: a function can only be assumed not to use regexps
if it is really trivial/primitive (e.g. `car' or `expand-file-name').

Otherwise we'll end up having to either add save-match-data around most
functions, or add a note in their docstring that they may modify the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]