diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-05-03 08:27:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-05-03 08:27:40 +0000 |
commit | 06f4c744de98ee96f88c75558fa1ceb39f00e8e0 (patch) | |
tree | 625ce1a330a121ee0e1ccfb77ed8bcd178dd0a89 /lisp/isearch.el | |
parent | 8b8d76995b0180542f341d9ea613ba01c09e9ac3 (diff) | |
download | emacs-06f4c744de98ee96f88c75558fa1ceb39f00e8e0.tar.gz |
(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.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index d172dcef284..ec86de79cdf 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -4,7 +4,7 @@ ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> -;; |$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)) (isearch-update)) +(defun isearch-toggle-case-fold () + "Toggle case folding in searching on or off." + (interactive) + (setq isearch-case-fold-search + (if isearch-case-fold-search nil 'yes)) + (message "%s%s [case %ssensitive]" + (isearch-message-prefix) + isearch-message + (if isearch-case-fold-search "in" "")) + (setq isearch-adjusted t) + (sit-for 1) + (isearch-update)) + (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 |