From: Stefan Kangas <stefankangas@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Eli Zaretskii <eliz@gnu.org>,
jonas@bernoul.li, 59328@debbugs.gnu.org, larsi@gnus.org
Subject: bug#59328: 29.0.50; `seq-keep' implementation only valid for lists
Date: Fri, 25 Nov 2022 12:34:38 +0100 [thread overview]
Message-ID: <CADwFkm=ASjCQAMwXD9Qxb0jb19xpUg7wQtegkN9w=GbARhXFKg@mail.gmail.com> (raw)
In-Reply-To: <87wn7jfjrg.fsf@web.de>
Michael Heerdegen <michael_heerdegen@web.de> writes:
> #+begin_src emacs-lisp
> (progn
> (defvar gensym)
> (let ((gensym (make-symbol "foo")))
> (eval `(cl-defmethod seq-map (function (thing (head ,gensym)))
> (append (list (car thing) (cadr thing)) (seq-map function (cddr thing))))
> t)
> (equal (list gensym nil 4 46)
> (seq-keep (lambda (x) (and (integerp x) (* 2 x)))
> (list gensym nil 2 'x gensym 23)))))
> #+end_src
>
> returns t with my patch installed and nil else and works without relying
> on something external. I'm not sure if defining methods (for seq-map in
> this case) that are globally visible is allowed in tests, so I
> implemented the example above in a way that the change of the generic
> function is not visible from the outside (thus the "secret" gensym).
We allow things that are globally visible, yes, as that will only
affect testing sessions. So I think dropping the gensym will be an
improvement.
> Would something like that be acceptable?
Makes sense to me. Perhaps we should do something similar for other
seq.el tests.
next prev parent reply other threads:[~2022-11-25 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 2:17 bug#59328: 29.0.50; `seq-keep' implementation only valid for lists Michael Heerdegen
2022-11-19 13:12 ` Eli Zaretskii
2022-11-24 13:04 ` Michael Heerdegen
2022-11-24 14:19 ` Eli Zaretskii
2022-11-24 14:26 ` Michael Heerdegen
2022-11-24 15:00 ` Eli Zaretskii
2022-11-24 15:09 ` Michael Heerdegen
2022-11-24 15:15 ` Eli Zaretskii
2022-11-24 15:25 ` Michael Heerdegen
2022-11-24 17:02 ` Eli Zaretskii
2022-11-25 9:47 ` Michael Heerdegen
2022-11-25 11:34 ` Stefan Kangas [this message]
2022-11-25 11:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=ASjCQAMwXD9Qxb0jb19xpUg7wQtegkN9w=GbARhXFKg@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=59328@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jonas@bernoul.li \
--cc=larsi@gnus.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.