>> + ;; Even if there's no uppercase char, we want to detect the use of
>> + ;; [:upper:] char-class.
> Similarly, it would make sense for [:lower:] to disable case-folding.
Indeed. And my previous patch was confused. I believe the one below
should work.
Stefan
--- orig/lisp/isearch.el
+++ mod/lisp/isearch.el
@@ -2297,7 +2297,17 @@
(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.
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug