Recognize defstruct slot names in various eieio functions

* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Set
each slot's name's 'slot-name' property so that
'eieio--known-slot-name-p' can recognize them.  (Bug#62959)

Copyright-paperwork-exempt: yes
This commit is contained in:
Thuna 2023-04-19 23:43:22 +02:00 committed by Eli Zaretskii
parent b93eb68cc3
commit 57562c3fd0

View file

@ -176,6 +176,7 @@ supertypes from the most specific to least specific.")
(i 0)
(offset (if type 0 1)))
(dolist (slot slots)
(put (car slot) 'slot-name t)
(let* ((props (cl--plist-to-alist (cddr slot)))
(typep (assq :type props))
(type (if (null typep) t