[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46523: cl-struct-sequence-type documentation is incorrect
From: |
Stefan Kangas |
Subject: |
bug#46523: cl-struct-sequence-type documentation is incorrect |
Date: |
Sat, 25 Sep 2021 08:25:16 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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?
- bug#46523: cl-struct-sequence-type documentation is incorrect,
Stefan Kangas <=