From: Stefan Kangas <stefan@marxist.se>
To: Michael <sp1ff@pobox.com>
Cc: 46523@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#46523: cl-struct-sequence-type documentation is incorrect
Date: Sat, 25 Sep 2021 08:25:16 -0700 [thread overview]
Message-ID: <CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@mail.gmail.com> (raw)
In-Reply-To: <87y2fqateb.fsf@pobox.com> (Michael's message of "Sun, 14 Feb 2021 19:42:36 -0800")
Michael <sp1ff@pobox.com> writes:
> Package: cl-macs
> Version: 2.02
>
> `cl-struct-sequence-type' states that it will "Return `record',
> `vector`, or `list' if STRUCT-TYPE is a struct type, nil
> otherwise." This is incorrect: it will return `vector' or `list'
> if the argument was declared with those types, but if the struct
> type was defaulted to `record' it will return nil. If the
> argument is not a struct type the function errors.
>
> This is due to the fact that `cl-struct-define' has the following
> clause:
>
> (if (eq type 'record)
> ;; Defstruct using record objects.
> (setq type nil))
>
> before `type' is passed to `cl--struct-new-class'
> (cf. cl-preloaded.el).
>
> I'm happy to submit a PR updating the docstring for
> `cl-struct-sequence-type', but wanted to verify that this is the
> desired behavior first (i.e. returning nil if the type is `record').
Does anyone who knows more about this have an opinion here?
next parent reply other threads:[~2021-09-25 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y2fqateb.fsf@pobox.com>
2021-09-25 15:25 ` Stefan Kangas [this message]
2021-09-27 18:52 ` bug#46523: cl-struct-sequence-type documentation is incorrect Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-17 14:48 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmnSuD6OPzUK7tKGwhZbMoTxtRyjABPqbsDSF1+S1=fXMw@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=46523@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sp1ff@pobox.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).