]> git.eshelyaron.com Git - emacs.git/commitdiff
Suppress compilation warning in srt-mode
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 17 Jun 2019 10:22:15 +0000 (12:22 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 17 Jun 2019 10:22:15 +0000 (12:22 +0200)
* lisp/cedet/srecode/srt-mode.el (srecode-parse-this-macro): Check
for the existence of `key' in the macro before using it, and
suppress the warning.

lisp/cedet/srecode/srt-mode.el

index 660225925e0460852c0af6ab637ac49db3cdd165..0179929e7a95064a34db613b775e83b4f0180182 100644 (file)
@@ -511,7 +511,10 @@ section or ? for an ask variable."
                               (split-string (oref inserter secondname)
                                             ":")
                             nil)))
-                   (key (oref inserter key)))
+                   (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)))))
                (cond ((null key)
                       ;; A plain variable
                       (cons nil base))