GNU bug report logs - #46523
cl-struct-sequence-type documentation is incorrect

Previous Next

Package: emacs;

Reported by: Michael <sp1ff <at> pobox.com>

Date: Mon, 15 Feb 2021 04:37:01 UTC

Severity: minor

Fixed in version 28.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Michael <sp1ff <at> pobox.com>
Cc: 46523 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#46523: cl-struct-sequence-type documentation is incorrect
Date: Sat, 25 Sep 2021 08:25:16 -0700
Michael <sp1ff <at> 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?




This bug report was last modified 2 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.