From f7bb728281408170cfe79005b03d2b382a84cdbd Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 2 Dec 2017 19:01:54 -0500 Subject: [PATCH] Document limitation of regexp repetition (Bug#24914) * doc/lispref/searching.texi (Regexp Backslash): Explain that \{m,n\} may only use numbers up to 32767. * lisp/isearch.el (isearch-search): Update error message to include invalid input possibility. --- doc/lispref/searching.texi | 3 ++- lisp/isearch.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 755fa554bb..92b7e6d17e 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -639,7 +639,8 @@ Regexp Backslash is a more general postfix operator that specifies repetition with a minimum of @var{m} repeats and a maximum of @var{n} repeats. If @var{m} is omitted, the minimum is 0; if @var{n} is omitted, there is no -maximum. +maximum. For both forms, @var{m} and @var{n}, if specified, may be no +larger than 32767. For example, @samp{c[ad]\@{1,2\@}r} matches the strings @samp{car}, @samp{cdr}, @samp{caar}, @samp{cadr}, @samp{cdar}, and @samp{cddr}, and diff --git a/lisp/isearch.el b/lisp/isearch.el index 13fa97ea71..dfc5f9f3f7 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2853,7 +2853,7 @@ isearch-search ((string-match "\\`Premature \\|\\`Unmatched \\|\\`Invalid " isearch-error) - (setq isearch-error "incomplete input")) + (setq isearch-error "incomplete or invalid input")) ((and (not isearch-regexp) (string-match "\\`Regular expression too big" isearch-error)) (cond -- 2.11.0