[Top][All Lists]

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

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

From: Juri Linkov
Subject: Re: find-file-noselect needs save-match-data
Date: Sun, 10 Jun 2007 00:32:18 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>     It's quite the opposite IMO.  "safe" can mean many things, whereas
>     "nodata" clearly indicates that it doesn't set (or modify) match-data.
> Just "data" doesn't clearly refer to the match data.
> What this function would do is avoid side effects.
> What other names do people use to mean "without side effects"?

"Pure".  Though `pure-string-match' doesn't refer to the match data
at all.  It can refer to many different things.

I see no better name than `string-match-no-data' because it clearly
says that it doesn't set match-data according to three words in its name:
"no", "match", "data".

We already have a very similar name `match-string-no-properties'
which returns a string without text properties.  By analogy
`string-match-no-data' would return the match index without setting
the match data.

>     Again, I like the inhibit- name, as other similar variables use the same
> The name `inhibit-match-data' doesn't fit with a feature that inhibit
> _setting_ the match data.  Other variables called `inhibit-...'
> followed by a the name of some data inhibit the data from being obeyed
> or acted on.  It doesn't seem right to use a similar name to prevent
> setting the data.

What about `inhibit-set-match-data'?

Juri Linkov

reply via email to

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