Subject: bug#59328: 29.0.50; `seq-keep' implementation only valid for lists

From: Michael Heerdegen <[email-masked]>
Date: Thu, 24 Nov 2022 16:09:32 +0100

Eli Zaretskii <[email-masked]> writes:

> > Every kind of sequence (in the sense of seq.el) that exists in Emacs is
> > not affected by the bug.  A test makes only sense for types that are,
> > but those are defined in libraries that are not in Gnu Emacs, only in
> > Gnu Elpa.  But I can't make the test depend on them.
>
> I see I was confused by the Subject of your bug report.
>
> OK, then just install this, though now I wonder why we need this change...

Without that change `seq-keep' would error for sequence types like
streams.  Try for example

#+begin_src emacs-lisp
(require 'stream)
(seq-keep
 (lambda (x) (and (<= 0 x) x))
 (stream (list -1 2 -3 4)))
#+end_src

That errors without the proposed change but it's a legitimate call (and
it should return a stream of course).

Michael.