diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index b6acab2a25a37779ecce34b1c4fa561a5a86c2c4..620b47e68d2ffac3a1324ab2f16cbdc46d00e43d 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -1085,9 +1085,10 @@ method invocation orders of the involved classes." These match if the argument is the name of a subclass of CLASS." (list eieio--generic-subclass-generalizer)) -(defun eieio-declare-slots (&rest slots) +(defmacro eieio-declare-slots (&rest slots) "Declare that SLOTS are known eieio object slot names." - (setq eieio--known-slot-names (append slots eieio--known-slot-names))) + `(eval-when-compile + (setq eieio--known-slot-names (append ',slots eieio--known-slot-names)))) (provide 'eieio-core)