emacs-devel
[Top][All Lists]
Advanced

[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 18:29:50 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> That is true, but still it might be good to add a variant of
> string-match that doesn't alter the match-data.

I don't see a strong need for it.  And why only string-match?  Wouldn't we
want to do the same for looking-at, and re-search-forward, and ...?

> This function won't be faster than string-match, but it could be a lot
> faster than (save-match-data (string-match...)), which is the way
> to do this now.

> Perhaps the name should be `safe-string-match'.

I don't find it much safer, so maybe `string-match-nodata' would be better?

Then again, maybe adding an `inhibit-match-data' variable would
be preferable.


        Stefan




reply via email to

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