From: Lars Ingebrigtsen Date: Mon, 17 Jun 2019 13:48:39 +0000 (+0200) Subject: Change the eieio-declare-slots function into a macro X-Git-Tag: emacs-27.0.90~2439 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0b322e33c3e6d782da596ae91f3916d7195c12e;p=emacs.git Change the eieio-declare-slots function into a macro * lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): Change into a compile-only macro. --- diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index b6acab2a25a..620b47e68d2 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)