diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2019-03-06 22:50:36 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2019-03-06 22:52:43 +0100 |
commit | 3fd2100bff58008b1eaf48922539d914c6ce6c16 (patch) | |
tree | ff6823b121e33bf78722235da5f7fb4a60f65965 /lisp/emacs-lisp/regexp-opt.el | |
parent | 870a33328123f91c2b96fbdead8b7ebadc53b9c8 (diff) | |
download | emacs-3fd2100bff58008b1eaf48922539d914c6ce6c16.tar.gz emacs-3fd2100bff58008b1eaf48922539d914c6ce6c16.tar.bz2 emacs-3fd2100bff58008b1eaf48922539d914c6ce6c16.zip |
Rename regexp-opt argument noreorder to keep-order
* doc/lispref/searching.texi (Regular Expression Functions):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
Rename newly added `noreorder' argument to `keep-order', to avoid a
negative in the name. Suggested by Phil Sainty (Bug#34641).
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 4404b905a6f..fce6a47d989 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -84,7 +84,7 @@ ;;; Code: ;;;###autoload -(defun regexp-opt (strings &optional paren noreorder) +(defun regexp-opt (strings &optional paren keep-order) "Return a regexp to match a string in the list STRINGS. Each string should be unique in STRINGS and should not contain any regexps, quoted or not. Optional PAREN specifies how the @@ -114,7 +114,7 @@ nil necessary to ensure that a postfix operator appended to it will apply to the whole expression. -The optional argument NOREORDER, if nil or omitted, allows the +The optional argument KEEP-ORDER, if nil or omitted, allows the returned regexp to match the strings in any order. If non-nil, the match is guaranteed to be performed in the order given, as if the strings were made into a regexp by joining them with the @@ -149,7 +149,7 @@ usually more efficient than that of a simplified version: (concat (or open "\\(?:") "a\\`\\)")) ;; If we cannot reorder, give up all attempts at ;; optimisation. There is room for improvement (Bug#34641). - ((and noreorder (regexp-opt--contains-prefix sorted-strings)) + ((and keep-order (regexp-opt--contains-prefix sorted-strings)) (concat (or open "\\(?:") (mapconcat #'regexp-quote strings "\\|") "\\)")) |