help-debbugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46523: cl-struct-sequence-type documentation is incorrect


From: Michael
Subject: bug#46523: cl-struct-sequence-type documentation is incorrect
Date: Sun, 14 Feb 2021 19:42:36 -0800
User-agent: mu4e 1.2.0; emacs 28.0.50

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').

--
Michael <sp1ff@pobox.com>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]