[Top][All Lists]

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

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

From: Kim F. Storm
Subject: Re: find-file-noselect needs save-match-data
Date: Fri, 08 Jun 2007 10:31:25 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     > Perhaps the name should be `safe-string-match'.
>     I don't find it much safer, so maybe `string-match-nodata' would be 
> better?
> "safe" seems good to me.  "nodata" doesn't seem to express a clear meaning.

It's quite the opposite IMO.  "safe" can mean many things, whereas
"nodata" clearly indicates that it doesn't set (or modify) match-data.

>     Then again, maybe adding an `inhibit-match-data' variable would
>     be preferable.
> That idea could be useful.  I'd prefer the name `preserve-match-data',
> or `set-match-data' (which you could bind to nil).

Again, I like the inhibit- name, as other similar variables use the same
prefix, so it will be easier to remember.

But in practice, we should have a macro to encapsulate calls:

    (preserve-match-data (string-match ...))

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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