* lisp/isearch.el (isearch-search): Change regexp error message for non-regexp searches.

Fixes: debbugs:15166
This commit is contained in:
Juri Linkov 2013-08-28 19:33:02 +03:00
parent 5ab473cdda
commit 121f8c95b2
2 changed files with 17 additions and 4 deletions

View 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,

View 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)