[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
match-data.
Stefan
- find-file-noselect needs save-match-data, Herbert Euler, 2007/06/04
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/06
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/06
- Re: find-file-noselect needs save-match-data, Lennart Borgman (gmail), 2007/06/06
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/06
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/06
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/06
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/08
- Re: find-file-noselect needs save-match-data, Kim F. Storm, 2007/06/08
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/08