* bug#46523: cl-struct-sequence-type documentation is incorrect
[not found] <87y2fqateb.fsf@pobox.com>
@ 2021-09-25 15:25 ` Stefan Kangas
2021-09-27 18:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2021-09-25 15:25 UTC (permalink / raw)
To: Michael; +Cc: 46523, Stefan Monnier
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#46523: cl-struct-sequence-type documentation is incorrect
2021-09-25 15:25 ` bug#46523: cl-struct-sequence-type documentation is incorrect Stefan Kangas
@ 2021-09-27 18:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-17 14:48 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-27 18:52 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 46523, Michael
> Does anyone who knows more about this have an opinion here?
Returning nil sounds fine to me,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#46523: cl-struct-sequence-type documentation is incorrect
2021-09-27 18:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-17 14:48 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-17 14:48 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Stefan Kangas, 46523, Michael
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Does anyone who knows more about this have an opinion here?
>
> Returning nil sounds fine to me,
So I've now updated the doc string here on the emacs-28 branch.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-17 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <87y2fqateb.fsf@pobox.com>
2021-09-25 15:25 ` bug#46523: cl-struct-sequence-type documentation is incorrect Stefan Kangas
2021-09-27 18:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-17 14:48 ` Lars Ingebrigtsen
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).