]> code.delx.au - gnu-emacs/commitdiff
(isearch-quote-char): Use it.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Dec 2004 15:12:08 +0000 (15:12 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Dec 2004 15:12:08 +0000 (15:12 +0000)
lisp/isearch.el

index 1057547cb3fc1906027d9fa5d5328379d09f8e42..118d23ce38fab9306805695637930fe0a48be51f 100644 (file)
@@ -1682,13 +1682,9 @@ Isearch mode."
     ;; single-byte character set, and convert them to Emacs
     ;; characters.
     (if (and isearch-regexp (= char ?\ ))
-       (if (condition-case err
-               (progn
-                 (string-match isearch-string "")
-                 nil)
-             (error (equal (cadr err) "Unmatched [ or [^")))
-           (isearch-process-search-char char)
-         (isearch-process-search-string "[ ]" " "))
+       (if (subregexp-context-p isearch-string pos)
+           (isearch-process-search-string "[ ]" " ")
+         (isearch-process-search-char char))
       (and enable-multibyte-characters
           (>= char ?\200)
           (<= char ?\377)