]> git.eshelyaron.com Git - emacs.git/commitdiff
(isearch-no-upper-case-p): Look for [:upper:] as well.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Jan 2007 13:20:47 +0000 (13:20 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Jan 2007 13:20:47 +0000 (13:20 +0000)
lisp/ChangeLog
lisp/isearch.el

index db05c6b76e83ba77ecceca1e9b75f245c3b69abc..517dc9dd9623279af490edd339f113055557d697 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * isearch.el (isearch-no-upper-case-p): Look for [:upper:] as well.
+
 2007-01-16  martin rudalics  <rudalics@gmx.at>
 
        * textmodes/ispell.el (ispell-dictionary-alist-3): Replace "---"
index ca569eeff1682c7a16aff50497914bcbfcecafb3..28d309f88c4916c56bb4ce09f64b2c301ac59619 100644 (file)
@@ -1,7 +1,7 @@
 ;;; isearch.el --- incremental search minor mode
 
 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
-;;   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;;   2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
 ;; Maintainer: FSF
@@ -2235,7 +2235,18 @@ since they have special meaning in a regexp."
              (setq found t))
          (setq quote-flag nil)))
       (setq i (1+ i)))
-    (not found)))
+    (not (or found
+             ;; Even if there's no uppercase char, we want to detect the use
+             ;; of [:upper:] or [:lower:] char-class, which indicates
+             ;; clearly that the user cares about case distinction.
+             (and regexp-flag (string-match "\\[:\\(upp\\|low\\)er:]" string)
+                  (condition-case err
+                      (progn
+                        (string-match (substring string 0 (match-beginning 0))
+                                      "")
+                        nil)
+                    (invalid-regexp
+                     (equal "Unmatched [ or [^" (cadr err)))))))))
 
 ;; Portability functions to support various Emacs versions.