34: 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 'XXX-mode-hook (function (lambda () (setq case-fold-search nil))))