diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2019-02-25 15:22:02 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2019-03-02 16:22:37 +0100 |
commit | 7bda34af52687440632127b4b79986e951b978b1 (patch) | |
tree | be661e3d387f6bea5043746309b7d337da9e9014 /doc/lispref/searching.texi | |
parent | da758046da74e33273265cd2e72a8aa1a0c9c7e3 (diff) | |
download | emacs-7bda34af52687440632127b4b79986e951b978b1.tar.gz |
Correct regexp-opt return value for empty string list
When regexp-opt is called with an empty list of strings, return a regexp
that doesn't match anything instead of the empty string (Bug#20307).
* doc/lispref/searching.texi (Regular Expression Functions):
* etc/NEWS:
Document the new behaviour.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
Return a never-match regexp for empty inputs.
Diffstat (limited to 'doc/lispref/searching.texi')
-rw-r--r-- | doc/lispref/searching.texi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index fb7f48474d5..38e62040550 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -960,6 +960,9 @@ possible. A hand-tuned regular expression can sometimes be slightly more efficient, but is almost never worth the effort.}. @c E.g., see https://debbugs.gnu.org/2816 +If @var{strings} is the empty list, the return value is a regexp that +never matches anything. + The optional argument @var{paren} can be any of the following: @table @asis |