diff options
| author | Juri Linkov | 2013-08-28 19:33:02 +0300 |
|---|---|---|
| committer | Juri Linkov | 2013-08-28 19:33:02 +0300 |
| commit | 121f8c95b2925f9bb4d65a7076c8024d474adb11 (patch) | |
| tree | b9578d7375185630bf3b363b25b1e16b83f02a41 | |
| parent | 5ab473cddaadd1d80efbddc1fa64a3e925a6a11b (diff) | |
| download | emacs-121f8c95b2925f9bb4d65a7076c8024d474adb11.tar.gz emacs-121f8c95b2925f9bb4d65a7076c8024d474adb11.zip | |
* lisp/isearch.el (isearch-search): Change regexp error message for non-regexp searches.
Fixes: debbugs:15166
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/isearch.el | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31533b92a99..efd6d7b3fac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-08-28 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch.el (isearch-search): Change regexp error message for | ||
| 4 | non-regexp searches. (Bug#15166) | ||
| 5 | |||
| 1 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, | 8 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 32de931954f..58f50eb9054 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -2784,10 +2784,18 @@ update the match data, and return point." | |||
| 2784 | 2784 | ||
| 2785 | (invalid-regexp | 2785 | (invalid-regexp |
| 2786 | (setq isearch-error (car (cdr lossage))) | 2786 | (setq isearch-error (car (cdr lossage))) |
| 2787 | (if (string-match | 2787 | (cond |
| 2788 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " | 2788 | ((string-match |
| 2789 | isearch-error) | 2789 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " |
| 2790 | (setq isearch-error "incomplete input"))) | 2790 | isearch-error) |
| 2791 | (setq isearch-error "incomplete input")) | ||
| 2792 | ((and (not isearch-regexp) | ||
| 2793 | (string-match "\\`Regular expression too big" isearch-error)) | ||
| 2794 | (cond | ||
| 2795 | (isearch-word | ||
| 2796 | (setq isearch-error "Too many words")) | ||
| 2797 | ((and isearch-lax-whitespace search-whitespace-regexp) | ||
| 2798 | (setq isearch-error "Too many spaces for whitespace matching")))))) | ||
| 2791 | 2799 | ||
| 2792 | (search-failed | 2800 | (search-failed |
| 2793 | (setq isearch-success nil) | 2801 | (setq isearch-success nil) |