Subject: bug#34852: 26.1; seq-intersection ignores nil as element

From: Michael Heerdegen <[email-masked]>
Date: Thu, 14 Mar 2019 13:07:19 +0100

"Miguel V. S. Frasson" <[email-masked]> writes:

> seq-intersection skips nil as common element, so returns wrong result.
>
> Reproducing from emacs -Q:
>
> In *scratch* buffer, eval the expressions
>
> (progn
>   (require 'seq)
>   (seq-intersection '(1 2 nil) '(1 nil) 'eq))
>
> -> (1)
>
> (seq-intersection '(1 2 nil) '(1 nil) 'equal)
>
> -> (1)
>
> Expected result in both cases: (1 nil)

Indeed.

Nicolas, can you have a look?  We probably can't use `seq-contains' in
the implementation.

Thanks,

Michael.