emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 44a086e 3/3: Declare unknown slots to silence the c


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 44a086e 3/3: Declare unknown slots to silence the compiler
Date: Mon, 17 Jun 2019 09:51:54 -0400 (EDT)

branch: master
commit 44a086e5ccb920bb5a310079130ce1eaabdfe4ce
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Declare unknown slots to silence the compiler
    
    * lisp/cedet/ede/config.el (classpath): Declare slot.
    (ede-java-classpath): Revert previous hack.
    
    * lisp/cedet/srecode/srt-mode.el (key): Declare slot.
    (srecode-macro-help): Revert previous hack.
    (srecode-parse-this-macro): Ditto.
---
 lisp/cedet/ede/config.el       | 5 +++--
 lisp/cedet/srecode/srt-mode.el | 9 +++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el
index eb46be7..c8bf7f3 100644
--- a/lisp/cedet/ede/config.el
+++ b/lisp/cedet/ede/config.el
@@ -406,13 +406,14 @@ java class path.")
   ()
   "Class to mix into a project to support java.")
 
+(eieio-declare-slots classpath)
+
 (cl-defmethod ede-java-classpath ((proj ede-project-with-config-java))
   "Return the classpath for this project."
   ;; The `classpath' slot only exists in the Java parts of cedet, and
   ;; those have not been merged into Emacs.  Suppress the warning
   ;; about the unknown slot by using `intern'.
-  (slot-value (ede-config-get-configuration proj)
-              (intern "classpath" obarray)))
+  (oref (ede-config-get-configuration proj) classpath))
 
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index 0179929..5e7c7c1 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -229,6 +229,7 @@ we can tell font lock about them.")
        (insert ee))))
   )
 
+(eieio-declare-slots key)
 
 (defun srecode-macro-help ()
   "Provide help for working with macros in a template."
@@ -247,9 +248,7 @@ we can tell font lock about them.")
        (let* ((C (car chl))
               (name (symbol-name C))
               (key (when (slot-exists-p C 'key)
-                      ;; This avoids a compilation warning, but we
-                      ;; know that 'key exists here.
-                     (slot-value C (intern "key" obarray))))
+                     (oref C key)))
               (showexample t))
          (setq chl (cdr chl))
          (setq chl (append (eieio-class-children C) chl))
@@ -512,9 +511,7 @@ section or ? for an ask variable."
                                             ":")
                             nil)))
                    (key  (when (slot-exists-p inserter 'key)
-                            ;; This avoids a compilation warning, but we
-                            ;; know that 'key exists here.
-                           (slot-value inserter (intern "key" obarray)))))
+                           (oref inserter key))))
                (cond ((null key)
                       ;; A plain variable
                       (cons nil base))



reply via email to

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