--- isearch.el.~1.345.~ 2009-02-14 17:04:46.000000000 +0800 +++ isearch.el 2009-07-27 10:37:35.000000000 +0800 @@ -90,6 +90,18 @@ :type 'integer :group 'isearch) +(defcustom isearch-case-fold-search nil + "Non-nil means search should not ignore case. +'case-fold-search means that `isearch-case-fold-search' is set to +the local value of `case-fold-search'. 'yes is similar to non-nil +except that mixed case in the search string is ignored. Nil means +the search will ignore case." + :type '(choice (const :tag "Case insensitive" t) + (const :tag "Mixed case sensitive" nil) + (const :tag "Case sensitive" yes) + (other :tag "Value of case-fold-search" case-fold-search)) + :group 'isearch) + (defcustom search-upper-case 'not-yanks "If non-nil, upper case chars disable case fold searching. That is, upper and lower case chars must match exactly. @@ -544,11 +556,6 @@ (defvar isearch-just-started nil) (defvar isearch-start-hscroll 0) ; hscroll when starting the search. -;; case-fold-search while searching. -;; either nil, t, or 'yes. 'yes means the same as t except that mixed -;; case in the search string is ignored. -(defvar isearch-case-fold-search nil) - (defvar isearch-last-case-fold-search nil) ;; Used to save default value while isearch is active @@ -739,13 +746,16 @@ "Start Isearch minor mode. It is called by the function `isearch-forward' and other related functions." + ;; Initialize isearch-case-fold-search + (if (eq isearch-case-fold-search 'case-fold-search) + (setq isearch-case-fold-search case-fold-search)) + ;; Initialize global vars. (setq isearch-forward forward isearch-regexp regexp isearch-word word-p isearch-op-fun op-fun isearch-last-case-fold-search isearch-case-fold-search - isearch-case-fold-search case-fold-search isearch-string "" isearch-message "" isearch-cmds nil