summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-17 15:48:39 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-17 15:48:39 +0200
commitc0b322e33c3e6d782da596ae91f3916d7195c12e (patch)
tree7d74600fdab3e98af3fd249499c417cec369067d /lisp/emacs-lisp
parent1250a24f8ec2338d742d89bcaf83601496cee72a (diff)
downloademacs-c0b322e33c3e6d782da596ae91f3916d7195c12e.tar.gz
emacs-c0b322e33c3e6d782da596ae91f3916d7195c12e.tar.bz2
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.
Diffstat (limited to 'lisp/emacs-lisp')
-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."
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)