Mercurial > emacs
changeset 16635:1b774e82752f
(isearch-no-upper-case-p): Use downcase
so that we handle arbitrary kinds of casification.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 07 Dec 1996 22:17:50 +0000 |
parents | a076177cfac7 |
children | ba78d234fe6c |
files | lisp/isearch.el |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/isearch.el Sat Dec 07 22:16:27 1996 +0000 +++ b/lisp/isearch.el Sat Dec 07 22:17:50 1996 +0000 @@ -1417,11 +1417,15 @@ "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.