emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5b525f4 7/7: Use cl-typep instead of obsolete predi


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 5b525f4 7/7: Use cl-typep instead of obsolete predicate functions throughout cedet
Date: Fri, 14 Jun 2019 09:48:08 -0400 (EDT)

branch: master
commit 5b525f4f56f458d88b66be73cae2d1fc5b382db4
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use cl-typep instead of obsolete predicate functions throughout cedet
    
    * lisp/cedet/srecode/dictionary.el (srecode-create-dictionary):
    (srecode-dictionary-add-entries):
    (srecode-compound-toString):
    (srecode-dump):
    * lisp/cedet/srecode/compile.el (srecode-dump-code-list):
    * lisp/cedet/semantic/util.el (semantic-something-to-tag-table):
    * lisp/cedet/semantic/db-typecache.el (semanticdb-typecache-length):
    * lisp/cedet/semantic/db-ref.el (semanticdb-check-references):
    * lisp/cedet/semantic/db-find.el
    (semanticdb-find-incomplete-cache-entries-p):
    (semanticdb-find-translate-path-includes-default):
    (semanticdb-find-results-p):
    (semanticdb-find-result-with-nil-p):
    * lisp/cedet/semantic/analyze/complete.el
    (semantic-analyze-possible-completions): Use cl-typep instead of
    functions like `srecode-dictionary-compound-value-child-p' etc.
---
 lisp/cedet/semantic/analyze/complete.el | 2 +-
 lisp/cedet/semantic/db-find.el          | 8 ++++----
 lisp/cedet/semantic/db-ref.el           | 2 +-
 lisp/cedet/semantic/db-typecache.el     | 2 +-
 lisp/cedet/semantic/util.el             | 2 +-
 lisp/cedet/srecode/compile.el           | 2 +-
 lisp/cedet/srecode/dictionary.el        | 8 ++++----
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/cedet/semantic/analyze/complete.el 
b/lisp/cedet/semantic/analyze/complete.el
index 7d31ec7..b471c0d 100644
--- a/lisp/cedet/semantic/analyze/complete.el
+++ b/lisp/cedet/semantic/analyze/complete.el
@@ -89,7 +89,7 @@ in a buffer."
   ;;(semantic-refresh-tags-safe)
   (if (semantic-active-p)
     (with-syntax-table semantic-lex-syntax-table
-      (let* ((context (if (semantic-analyze-context-child-p context)
+      (let* ((context (if (cl-typep context 'semantic-analyze-context)
                          context
                        (semantic-analyze-current-context context)))
             (ans (if (not context)
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 50b1afb..fd6951b 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -362,7 +362,7 @@ Default action as described in 
`semanticdb-find-translate-path'."
   "Are there any incomplete entries in CACHE?"
   (let ((ans nil))
     (dolist (tab cache)
-      (when (and (semanticdb-table-child-p tab)
+      (when (and (cl-typep tab 'semanticdb-table)
                 (not (number-or-marker-p (oref tab pointmax))))
        (setq ans t))
       )
@@ -402,7 +402,7 @@ Default action as described in 
`semanticdb-find-translate-path'."
                      (semantic-buffer-local-value 'semanticdb-current-table 
path))
                     ((and (stringp path) (file-exists-p path))
                      (semanticdb-file-table-object path t))
-                    ((semanticdb-abstract-table-child-p path)
+                    ((cl-typep path 'semanticdb-abstract-table)
                      path)
                     (t nil))))
     (if table
@@ -910,7 +910,7 @@ This query only really tests the first entry in the list 
that is RESULTP,
 but should be good enough for debugging assertions."
   (and (listp resultp)
        (listp (car resultp))
-       (semanticdb-abstract-table-child-p (car (car resultp)))
+       (cl-typep (car (car resultp)) 'semanticdb-abstract-table)
        (or (semantic-tag-p (car (cdr (car resultp))))
           (null (car (cdr (car resultp)))))))
 
@@ -938,7 +938,7 @@ but should be good enough for debugging assertions."
   (and (listp resultp)
        (listp (car resultp))
        (let ((tag-to-test (car-safe (cdr (car resultp)))))
-        (or (and (semanticdb-abstract-table-child-p (car (car resultp)))
+        (or (and (cl-typep (car (car resultp)) 'semanticdb-abstract-table)
                  (or (semantic-tag-p tag-to-test)
                      (null tag-to-test)))
             (and (null (car (car resultp)))
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el
index cfe5c36..eb32d0d 100644
--- a/lisp/cedet/semantic/db-ref.el
+++ b/lisp/cedet/semantic/db-ref.el
@@ -88,7 +88,7 @@ refers to DBT will be removed."
     (while refs
       (let* ((ok t)
             (db (car refs))
-            (f (when (semanticdb-table-child-p db)
+            (f (when (cl-typep db 'semanticdb-table)
                  (semanticdb-full-filename db)))
             )
 
diff --git a/lisp/cedet/semantic/db-typecache.el 
b/lisp/cedet/semantic/db-typecache.el
index fe9d2d2..7e0f52f 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -114,7 +114,7 @@ Said object must support `semantic-reset' methods.")
 (defun semanticdb-typecache-length (thing)
   "How long is THING?
 Debugging function."
-  (cond ((semanticdb-typecache-child-p thing)
+  (cond ((cl-typep thing 'semanticdb-typecache)
         (length (oref thing stream)))
        ((semantic-tag-p thing)
         (length (semantic-tag-type-members thing)))
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index 943f9c7..6b1cc61 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -119,7 +119,7 @@ buffer, or a filename.  If SOMETHING is nil return nil."
    ((and (featurep 'semantic/db)
         (require 'semantic/db-mode)
         (semanticdb-minor-mode-p)
-        (semanticdb-abstract-table-child-p something))
+        (cl-typep something 'semanticdb-abstract-table))
     (semanticdb-refresh-table something)
     (semanticdb-get-tags something))
    ;; Semanticdb find-results
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index 586ed0a..834cbff 100644
--- a/lisp/cedet/srecode/compile.el
+++ b/lisp/cedet/srecode/compile.el
@@ -617,7 +617,7 @@ Argument INDENT specifies the indentation level for the 
list."
       (princ ") ")
       (cond ((stringp (car code))
             (prin1 (car code)))
-           ((srecode-template-inserter-child-p (car code))
+           ((cl-typep (car code) 'srecode-template-inserter)
             (srecode-dump (car code) indent))
            (t
             (princ "Unknown Code: ")
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el
index 63635e5..1058024 100644
--- a/lisp/cedet/srecode/dictionary.el
+++ b/lisp/cedet/srecode/dictionary.el
@@ -172,7 +172,7 @@ associated with a buffer or parent."
              initfrombuff t))
 
        ;; Parent is another dictionary
-       ((srecode-dictionary-child-p buffer-or-parent)
+       ((cl-typep buffer-or-parent 'srecode-dictionary)
        (setq parent buffer-or-parent
              buffer (oref buffer-or-parent buffer)
              origin (concat (eieio-object-name buffer-or-parent) " in "
@@ -356,7 +356,7 @@ values but STATE is nil."
        (srecode-dictionary-set-value dict name value))
 
        ;; Value is a dictionary; insert as child dictionary.
-       ((srecode-dictionary-child-p value)
+       ((cl-typep value 'srecode-dictionary)
        (srecode-dictionary-merge
         (srecode-dictionary-add-section-dictionary dict name)
         value t))
@@ -523,7 +523,7 @@ inserted with a new editable field.")
        ;; No default value.
        ((not dv) (insert name))
        ;; A compound value as the default?  Recurse.
-       ((srecode-dictionary-compound-value-child-p dv)
+       ((cl-typep dv 'srecode-dictionary-compound-value)
        (srecode-compound-toString dv function dictionary))
        ;; A string that is empty?  Use the name.
        ((and (stringp dv) (string= dv ""))
@@ -659,7 +659,7 @@ STATE is the current compiler state."
                        ))
                    (princ "\n")
                    )
-                  ((srecode-dictionary-compound-value-child-p entry)
+                  ((cl-typep entry 'srecode-dictionary-compound-value)
                    (srecode-dump entry indent)
                    (princ "\n")
                    )



reply via email to

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