Commit 4453091d authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(isearch-case-fold-search): new possible value `yes'

is like t except that mixed case in search string is ignored.
(isearch-toggle-case-fold): New function.
(isearch-search): Don't undo the work of isearch-toggle-case-fold.
parent a874c104
......@@ -4,7 +4,7 @@
;; Author: Daniel LaLiberte <>
;; |$Date: 1994/01/21 04:19:19 $|$Revision: 1.64 $
;; |$Date: 1994/04/07 20:28:23 $|$Revision: 1.65 $
;; This file is part of GNU Emacs.
......@@ -301,6 +301,7 @@ Default value, nil, means edit the string instead.")
;; Some bindings you may want to put in your isearch-mode-hook.
;; Suggest some alternates...
;; (define-key isearch-mode-map "\C-t" 'isearch-toggle-case-fold)
;; (define-key isearch-mode-map "\C-t" 'isearch-toggle-regexp)
;; (define-key isearch-mode-map "\C-^" 'isearch-edit-string)
......@@ -339,7 +340,10 @@ Default value, nil, means edit the string instead.")
(defvar isearch-wrapped nil) ; Searching restarted from the top (bottom).
(defvar isearch-barrier 0)
(defvar isearch-case-fold-search nil) ; case-fold-search while searching.
; 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-adjusted nil)
(defvar isearch-slow-terminal-mode nil)
......@@ -875,6 +879,19 @@ Use `isearch-exit' to quit without signalling."
(if isearch-regexp (setq isearch-word nil))
(defun isearch-toggle-case-fold ()
"Toggle case folding in searching on or off."
(setq isearch-case-fold-search
(if isearch-case-fold-search nil 'yes))
(message "%s%s [case %ssensitive]"
(if isearch-case-fold-search "in" ""))
(setq isearch-adjusted t)
(sit-for 1)
(defun isearch-delete-char ()
"Discard last input item and move point back.
If no previous match was done, just beep."
......@@ -1306,7 +1323,7 @@ If there is no completion possible, say so and continue searching."
(defun isearch-search ()
;; Do the search with the current search string.
(isearch-message nil t)
(if (and isearch-case-fold-search search-upper-case)
(if (and (eq isearch-case-fold-search t) search-upper-case)
(setq isearch-case-fold-search
(isearch-no-upper-case-p isearch-string isearch-regexp)))
(condition-case lossage
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment