summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio-core.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-17 15:46:09 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-17 15:46:09 +0200
commit1250a24f8ec2338d742d89bcaf83601496cee72a (patch)
treef31463bc68b46580d6a17606c4c0f3ebb5faa223 /lisp/emacs-lisp/eieio-core.el
parenta07c647a2a0426e3e7380d279f4d469fcd3e913c (diff)
downloademacs-1250a24f8ec2338d742d89bcaf83601496cee72a.tar.gz
emacs-1250a24f8ec2338d742d89bcaf83601496cee72a.tar.bz2
emacs-1250a24f8ec2338d742d89bcaf83601496cee72a.zip
New function eieio-declare-slots
* lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): New function to suppress compiler warnings about unknown slots.
Diffstat (limited to 'lisp/emacs-lisp/eieio-core.el')
-rw-r--r--lisp/emacs-lisp/eieio-core.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 01a821ed2a1..b6acab2a25a 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -1085,6 +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)
+ "Declare that SLOTS are known eieio object slot names."
+ (setq eieio--known-slot-names (append slots eieio--known-slot-names)))
+
(provide 'eieio-core)
;;; eieio-core.el ends here