aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/searching.texi9
1 files changed, 3 insertions, 6 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 5f4509a8b43..1f6db0643e8 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1745,7 +1745,7 @@ any special characters.
1745@end defun 1745@end defun
1746 1746
1747@cindex optimize regexp 1747@cindex optimize regexp
1748@defun regexp-opt strings &optional paren keep-order 1748@defun regexp-opt strings &optional paren
1749This function returns an efficient regular expression that will match 1749This function returns an efficient regular expression that will match
1750any of the strings in the list @var{strings}. This is useful when you 1750any of the strings in the list @var{strings}. This is useful when you
1751need to make matching or searching as fast as possible---for example, 1751need to make matching or searching as fast as possible---for example,
@@ -1783,11 +1783,8 @@ if it is necessary to ensure that a postfix operator appended to
1783it will apply to the whole expression. 1783it will apply to the whole expression.
1784@end table 1784@end table
1785 1785
1786The optional argument @var{keep-order}, if non-@code{nil}, forces the 1786The returned regexp is ordered in such a way that it will always match
1787match to be performed in the order given, as if the strings were made 1787the longest string possible.
1788into a regexp by joining them with the @samp{\|} operator. If nil or
1789omitted, the returned regexp will always match the longest string
1790possible.
1791 1788
1792Up to reordering, the resulting regexp of @code{regexp-opt} is 1789Up to reordering, the resulting regexp of @code{regexp-opt} is
1793equivalent to but usually more efficient than that of a simplified 1790equivalent to but usually more efficient than that of a simplified