Function: eieio-declare-slots
eieio-declare-slots is a macro defined in eieio-core.el.gz.
Signature
(eieio-declare-slots &rest SLOTS)
Documentation
Declare that SLOTS are known eieio object slot names.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio-core.el.gz
(defmacro eieio-declare-slots (&rest slots)
"Declare that SLOTS are known eieio object slot names."
(let ((slotnames (mapcar (lambda (s) (if (consp s) (car s) s)) slots))
(classslots (delq nil
(mapcar (lambda (s)
(when (and (consp s)
(eq :class (plist-get (cdr s)
:allocation)))
(car s)))
slots))))
`(eval-when-compile
,@(when classslots
(mapcar (lambda (s) `(add-to-list 'eieio--known-class-slot-names ',s))
classslots))
,@(mapcar (lambda (s) `(add-to-list 'eieio--known-slot-names ',s))
slotnames))))