GNU Info

Info Node: (efaq)Controlling case sensitivity

(efaq)Controlling case sensitivity


Next: Wrapping words automatically Prev: Highlighting a region Up: Common requests
Enter node , (file) or (file)node

How do I control Emacs's case-sensitivity when searching/replacing?
===================================================================

   For searching, the value of the variable `case-fold-search'
determines whether they are case sensitive:

     (setq case-fold-search nil) ; make searches case sensitive
     (setq case-fold-search t)   ; make searches case insensitive

   Similarly, for replacing, the variable `case-replace' determines
whether replacements preserve case.

   To change the case sensitivity just for one major mode, use the major
mode's hook.  For example:

     (add-hook 'FOO-mode-hook
               (lambda ()
                (setq case-fold-search nil)))


automatically generated by info2www version 1.2.2.9