Stef Epardaud <stef(a)lunatech.com> wrote:
now i know the replace is case-sensitive if the FROM argument has
case, but
should it not be case sensitive as well if the TO argument has case when the
FROM does not have ?
No. You search for a /pattern/, you replace with a /string/. If you
have `case-fold-search' to non-nil, it's convenient that XEmacs notice the
uppercase character in FROM, and deduce that you actually want
case sensitiveness. Moerover it's coherent with what interactive searches do.
It doesn't make sense to toggle case sensitiveness according to the TO string.
so it did after all what i wanted, but still it did match
'ObjectName'
which i didn't want it to match. actually i think it would make sense to
make it case-sensitive if there are case in any of the 2 arguments .
Again, no, because what you want to do is more complex than what the
feature is for. You actually want a different treatment for one character in
the string, being uppercase or lowercase. That's the kind of thing
query-replace-regexp is for. You can query-replace-regexp "object[n\\|N]ame",
in which XEmacs will notice the uppercase letter and deduce you want
temporarily case sensitiveness. This won't match "ObjectName".
For really complex stuff, you'll have no choice but toggle manually
case sensitiveness as you wish, but this is a good thing. Let's not complicate
the existing functions. And writing `query-replace-with-case' takes 3 lines.
tell me i am wrong, or better make this an option, or am i so wrong
i
don't deserve an option ? :-/
You're so wrong you don't deserve an option :-)
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / ENST, INFRES C201.1 mailto:vernaļ¼ inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. +33 (1) 45 81 73 46
75013 Paris, France Fax. +33 (1) 45 81 31 19