summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/searching.texi9
-rw-r--r--doc/lispref/variables.texi4
2 files changed, 7 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.
@end defun
@cindex optimize regexp
-@defun regexp-opt strings &optional paren keep-order
+@defun regexp-opt strings &optional paren
This function returns an efficient regular expression that will match
any of the strings in the list @var{strings}. This is useful when you
need 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
it will apply to the whole expression.
@end table
-The optional argument @var{keep-order}, if non-@code{nil}, forces the
-match to be performed in the order given, as if the strings were made
-into a regexp by joining them with the @samp{\|} operator. If nil or
-omitted, the returned regexp will always match the longest string
-possible.
+The returned regexp is ordered in such a way that it will always match
+the longest string possible.
Up to reordering, the resulting regexp of @code{regexp-opt} is
equivalent to but usually more efficient than that of a simplified
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 1e357754abe..35eb4d59fb0 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1229,6 +1229,10 @@ This function returns non-@code{nil} if @var{symbol} is a special
variable (i.e., it has a @code{defvar}, @code{defcustom}, or
@code{defconst} variable definition). Otherwise, the return value is
@code{nil}.
+
+Note that since this is a function, it can only return
+non-@code{nil} for variables which are permanently special, but not
+for those that are only special in the current lexical scope.
@end defun
The use of a special variable as a formal argument in a function is