1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 18:41:25 -08:00

* lisp/emacs-lisp/cl-preloaded.el: Fix the format of props in slot-descs

(cl--plist-remove): Remove.
(cl--plist-to-alist): New function.
(cl-struct-define): Use it to convert slots's properties to the
format expected by `cl-slot-descriptor`.

* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Revert last
changes, not needed any more.
This commit is contained in:
Stefan Monnier 2021-06-24 17:32:20 -04:00
parent 1283e1db9b
commit 3788d2237d
2 changed files with 13 additions and 18 deletions

View file

@ -901,14 +901,8 @@ Outputs to the current buffer."
(list (cl-prin1-to-string (cl--slot-descriptor-name slot))
(cl-prin1-to-string (cl--slot-descriptor-type slot))
(cl-prin1-to-string (cl--slot-descriptor-initform slot))
(let ((doc
;; The props are an alist in a `defclass',
;; but a plist when describing a `cl-defstruct'.
(if (consp (car (cl--slot-descriptor-props slot)))
(alist-get :documentation
(cl--slot-descriptor-props slot))
(plist-get (cl--slot-descriptor-props slot)
:documentation))))
(let ((doc (alist-get :documentation
(cl--slot-descriptor-props slot))))
(if (not doc) ""
(setq has-doc t)
(substitute-command-keys doc)))))