By default, searches in SXEmacs ignore the case of the text they are searching through; if you specify searching for ‘FOO’, then ‘Foo’ or ‘foo’ is also considered a match. Regexps, and in particular character sets, are included: thus, ‘[aB]’ would match ‘a’ or ‘A’ or ‘b’ or ‘B’.
If you do not want this feature, set the variable
case-fold-search to nil. Then all letters must match
exactly, including case. This is a buffer-local variable; altering the
variable affects only the current buffer. (See Intro to Buffer-Local.) Alternatively, you may change the value of
default-case-fold-search, which is the default value of
case-fold-search for buffers that do not override it.
Note that the user-level incremental search feature handles case distinctions differently. When given a lower case letter, it looks for a match of either case, but when given an upper case letter, it looks for an upper case letter only. But this has nothing to do with the searching functions Lisp functions use.
This variable determines whether the replacement functions should preserve case. If the variable is
nil, that means to use the replacement text verbatim. A non-nilvalue means to convert the case of the replacement text according to the text being replaced.The function
replace-matchis where this variable actually has its effect. See Replacing Match.