emacs-diffs
[Top][All Lists]
Advanced

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

master 6c49878: Pacify some semantic-tag-make-plist warnings


From: Basil L. Contovounesios
Subject: master 6c49878: Pacify some semantic-tag-make-plist warnings
Date: Sat, 6 Mar 2021 08:22:03 -0500 (EST)

branch: master
commit 6c498786fed219ee8f98092f7921b5a5b1aaca29
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Pacify some semantic-tag-make-plist warnings
    
    * lisp/cedet/semantic/tag.el (semantic-tag-make-plist): Define
    before its first use to pacify some recent "may not be defined at
    runtime" warnings after turning on lexical-binding.
---
 lisp/cedet/semantic/tag.el | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index 3d7bce8..a99e2ab 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -229,6 +229,28 @@ See also the function `semantic-ctxt-current-mode'."
           (require 'semantic/ctxt)
           (semantic-ctxt-current-mode)))))
 
+;; Is this function still necessary?
+(defun semantic-tag-make-plist (args)
+  "Create a property list with ARGS.
+Args is a property list of the form (KEY1 VALUE1 ... KEYN VALUEN).
+Where KEY is a symbol, and VALUE is the value for that symbol.
+The return value will be a new property list, with these KEY/VALUE
+pairs eliminated:
+
+  - KEY associated to nil VALUE.
+  - KEY associated to an empty string VALUE.
+  - KEY associated to a zero VALUE."
+  (let (plist key val)
+    (while args
+      (setq key  (car args)
+            val  (nth 1 args)
+            args (nthcdr 2 args))
+      (or (member val '("" nil))
+          (and (numberp val) (zerop val))
+          (setq plist (cons key (cons val plist)))))
+    ;; It is not useful to reverse the new plist.
+    plist))
+
 (defsubst semantic--tag-attributes-cdr (tag)
   "Return the cons cell whose car is the ATTRIBUTES part of TAG.
 That function is for internal use only."
@@ -441,28 +463,6 @@ class to store those methods."
 ;;; Tag creation
 ;;
 
-;; Is this function still necessary?
-(defun semantic-tag-make-plist (args)
-  "Create a property list with ARGS.
-Args is a property list of the form (KEY1 VALUE1 ... KEYN VALUEN).
-Where KEY is a symbol, and VALUE is the value for that symbol.
-The return value will be a new property list, with these KEY/VALUE
-pairs eliminated:
-
-  - KEY associated to nil VALUE.
-  - KEY associated to an empty string VALUE.
-  - KEY associated to a zero VALUE."
-  (let (plist key val)
-    (while args
-      (setq key  (car args)
-            val  (nth 1 args)
-            args (nthcdr 2 args))
-      (or (member val '("" nil))
-          (and (numberp val) (zerop val))
-          (setq plist (cons key (cons val plist)))))
-    ;; It is not useful to reverse the new plist.
-    plist))
-
 (defsubst semantic-tag (name class &rest attributes)
   "Create a generic semantic tag.
 NAME is a string representing the name of this tag.



reply via email to

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