[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c0b322e 2/3: Change the eieio-declare-slots functio
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master c0b322e 2/3: Change the eieio-declare-slots function into a macro |
Date: |
Mon, 17 Jun 2019 09:51:54 -0400 (EDT) |
branch: master
commit c0b322e33c3e6d782da596ae91f3916d7195c12e
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Change the eieio-declare-slots function into a macro
* lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): Change into
a compile-only macro.
---
lisp/emacs-lisp/eieio-core.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index b6acab2..620b47e 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)