]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el (isearch-search): Change regexp error message for non-regexp searches.
authorJuri Linkov <juri@jurta.org>
Wed, 28 Aug 2013 16:33:02 +0000 (19:33 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 28 Aug 2013 16:33:02 +0000 (19:33 +0300)
Fixes: debbugs:15166
lisp/ChangeLog
lisp/isearch.el

index 31533b92a99d2dde136feae4f358ff5cba5a68a9..efd6d7b3fac4da36e740d4445dd3ce862eaee227 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-28  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-search): Change regexp error message for
+       non-regexp searches.  (Bug#15166)
+
 2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
index 32de931954f6e5e73154729d7e15f02a20b1a63c..58f50eb905499bd701ce8442a4c87889cc6716db 100644 (file)
@@ -2784,10 +2784,18 @@ update the match data, and return point."
 
     (invalid-regexp
      (setq isearch-error (car (cdr lossage)))
-     (if (string-match
-         "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
-         isearch-error)
-        (setq isearch-error "incomplete input")))
+     (cond
+      ((string-match
+       "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
+       isearch-error)
+       (setq isearch-error "incomplete input"))
+      ((and (not isearch-regexp)
+           (string-match "\\`Regular expression too big" isearch-error))
+       (cond
+       (isearch-word
+        (setq isearch-error "Too many words"))
+       ((and isearch-lax-whitespace search-whitespace-regexp)
+        (setq isearch-error "Too many spaces for whitespace matching"))))))
 
     (search-failed
      (setq isearch-success nil)