bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20307: 25.0.50; (regexp-opt nil ...) returns ""


From: Artur Malabarba
Subject: bug#20307: 25.0.50; (regexp-opt nil ...) returns ""
Date: Mon, 13 Apr 2015 15:08:25 +0100

2015-04-12 10:50 GMT+01:00 David Kastrup
> Both
>
> M-: (regexp-opt nil) RET
>
> and
>
> M-: (regexp-opt nil t) RET
>
> return "".  However, they should return a regexp matching nothing
> rather than everything, and the second invocation should also count as
> one () pairing.

I agree there should be () on the second one, but I strongly disagree
they should match nothing.

regexp-opt is NOT meant to match only the given strings. It is meant
to match anything containing the given strings.

There is a very fundamental difference in that. The less strings you
pass to regexp-opt, the MORE things the regexp will match. Why would
we suddently flip that on its head when going from 1 to 0 strings?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]