emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1250a24 1/3: New function eieio-declare-slots


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 1250a24 1/3: New function eieio-declare-slots
Date: Mon, 17 Jun 2019 09:51:54 -0400 (EDT)

branch: master
commit 1250a24f8ec2338d742d89bcaf83601496cee72a
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    New function eieio-declare-slots
    
    * lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): New
    function to suppress compiler warnings about unknown slots.
---
 lisp/emacs-lisp/eieio-core.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 01a821e..b6acab2 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]