Given
(require 'cl-macs)
(cl-defstruct foobar
(baz nil :documentation "an important piece of information"))
Now, (describe-symbol 'foobar-baz) will include "an important piece of
information".
However, (describe-symbol 'foobar) will not:
Name Type Default
———— ———— ———————
baz t nil
... even though the intention to include it can be seen by looking for
the string ':documentation' in `cl--describe-class-slots`.
This is because `cl--describe-class-slots` accidentally uses
`alist-get` instead of `plist-get`.
With the attached patch, (describe-symbol 'foobar) works as intended:
Name Type Default Doc
———— ———— ——————— ———
baz t nil an important piece of information
Note: `cl--describe-class-slot' (a different function) appears to have
the same bug, but I have no idea how one would go about adding class
slots to a struct and therefore no way of testing any changes to this
other function.
Could it be a code path that is never executed anyway? I decided to
leave it alone, this patch should be an improvement regardless.