changeset 58801:33ad50d0b8f5

(isearch-quote-char): Use it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 06 Dec 2004 15:12:08 +0000
parents 212f5b190a89
children da163770bb89
files lisp/isearch.el
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/isearch.el	Mon Dec 06 15:11:51 2004 +0000
+++ b/lisp/isearch.el	Mon Dec 06 15:12:08 2004 +0000
@@ -1682,13 +1682,9 @@
     ;; 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)