diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-12-07 22:17:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-12-07 22:17:50 +0000 |
commit | 525d6e100c6773359813969f28757c3886c081c8 (patch) | |
tree | 9b57a868350ed83d21b5410c837247d8b8d81309 /lisp/isearch.el | |
parent | 7c3a6dcf26804af0d6b71e0dde3543fb7f408da5 (diff) | |
download | emacs-525d6e100c6773359813969f28757c3886c081c8.tar.gz |
(isearch-no-upper-case-p): Use downcase
so that we handle arbitrary kinds of casification.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 1da6f0d9f65..327ec264cc8 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1417,11 +1417,15 @@ If there is no completion possible, say so and continue searching." "Return t if there are no upper case chars in STRING. If REGEXP-FLAG is non-nil, disregard letters preceded by `\\' (but not `\\\\') since they have special meaning in a regexp." - (let ((case-fold-search nil)) - (not (string-match (if regexp-flag "\\(^\\|\\\\\\\\\\|[^\\]\\)[A-Z]" - "[A-Z]") - string)))) - + (let (quote-flag (i 0) (len (length string)) found) + (while (and (not found) (< i len)) + (let ((char (aref string i))) + (if (and regexp-flag (eq char ?\\)) + (setq quote-flag (not quote-flag)) + (if (and (not quote-flag) (not (eq char (downcase char)))) + (setq found t)))) + (setq i (1+ i))) + (not found))) ;; Portability functions to support various Emacs versions. |