> I would expect the regexp [[:upper:]] to behave the same as [A-Z] (in
> English text). However, by default [[:upper:]] matches all letters,
> whereas [A-Z] matches only upper case letters, as I expect.
Hmm... I can't see to get A-Z to only match upper-case letters ...
Oh I see what you mean now. Does the patch below fix it for you?
(I guess we could also allows the use of [:UPPER:] so you could workaround
this problem ;-)
Stefan
--- orig/lisp/isearch.el
+++ mod/lisp/isearch.el
@@ -2297,7 +2297,15 @@
(setq found t))
(setq quote-flag nil)))
(setq i (1+ i)))
- (not found)))
+ (or (not found)
+ ;; Even if there's no uppercase char, we want to detect the use of
+ ;; [:upper:] char-class.
+ (and regexp-flag (string-match "\\[:upper:]" string)
+ (condition-case err
+ (progn (string-match (substring string 0 (match-string 0)) "")
+ nil)
+ (invalid-regexp
+ (equal "Unmatched [ or [^" (cadr err))))))))
;; Portability functions to support various Emacs versions.
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug