Mercurial > emacs
comparison lisp/isearch.el @ 75258:38cd68f9ba51
(isearch-no-upper-case-p): Look for [:upper:] as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 17 Jan 2007 13:20:47 +0000 |
parents | edd6516d483d |
children | e78fc0d23669 b8d9a391daf3 95d0cdf160ea |
comparison
equal
deleted
inserted
replaced
75257:d33684b72b59 | 75258:38cd68f9ba51 |
---|---|
1 ;;; isearch.el --- incremental search minor mode | 1 ;;; isearch.el --- incremental search minor mode |
2 | 2 |
3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, | 3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, |
4 ;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 4 ;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> | 6 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> |
7 ;; Maintainer: FSF | 7 ;; Maintainer: FSF |
8 ;; Keywords: matching | 8 ;; Keywords: matching |
9 | 9 |
2233 (setq quote-flag (not quote-flag)) | 2233 (setq quote-flag (not quote-flag)) |
2234 (if (and (not quote-flag) (not (eq char (downcase char)))) | 2234 (if (and (not quote-flag) (not (eq char (downcase char)))) |
2235 (setq found t)) | 2235 (setq found t)) |
2236 (setq quote-flag nil))) | 2236 (setq quote-flag nil))) |
2237 (setq i (1+ i))) | 2237 (setq i (1+ i))) |
2238 (not found))) | 2238 (not (or found |
2239 ;; Even if there's no uppercase char, we want to detect the use | |
2240 ;; of [:upper:] or [:lower:] char-class, which indicates | |
2241 ;; clearly that the user cares about case distinction. | |
2242 (and regexp-flag (string-match "\\[:\\(upp\\|low\\)er:]" string) | |
2243 (condition-case err | |
2244 (progn | |
2245 (string-match (substring string 0 (match-beginning 0)) | |
2246 "") | |
2247 nil) | |
2248 (invalid-regexp | |
2249 (equal "Unmatched [ or [^" (cadr err))))))))) | |
2239 | 2250 |
2240 ;; Portability functions to support various Emacs versions. | 2251 ;; Portability functions to support various Emacs versions. |
2241 | 2252 |
2242 (defun isearch-text-char-description (c) | 2253 (defun isearch-text-char-description (c) |
2243 (cond | 2254 (cond |