aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-17 15:48:39 +0200
committerLars Ingebrigtsen2019-06-17 15:48:39 +0200
commitc0b322e33c3e6d782da596ae91f3916d7195c12e (patch)
tree7d74600fdab3e98af3fd249499c417cec369067d
parent1250a24f8ec2338d742d89bcaf83601496cee72a (diff)
downloademacs-c0b322e33c3e6d782da596ae91f3916d7195c12e.tar.gz
emacs-c0b322e33c3e6d782da596ae91f3916d7195c12e.zip
Change the eieio-declare-slots function into a macro
* lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): Change into a compile-only macro.
-rw-r--r--lisp/emacs-lisp/eieio-core.el5
1 files changed, 3 insertions, 2 deletions
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."
1085These match if the argument is the name of a subclass of CLASS." 1085These match if the argument is the name of a subclass of CLASS."
1086 (list eieio--generic-subclass-generalizer)) 1086 (list eieio--generic-subclass-generalizer))
1087 1087
1088(defun eieio-declare-slots (&rest slots) 1088(defmacro eieio-declare-slots (&rest slots)
1089 "Declare that SLOTS are known eieio object slot names." 1089 "Declare that SLOTS are known eieio object slot names."
1090 (setq eieio--known-slot-names (append slots eieio--known-slot-names))) 1090 `(eval-when-compile
1091 (setq eieio--known-slot-names (append ',slots eieio--known-slot-names))))
1091 1092
1092(provide 'eieio-core) 1093(provide 'eieio-core)
1093 1094