diff options
| author | Lars Ingebrigtsen | 2019-06-14 15:47:54 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-14 15:47:54 +0200 |
| commit | 5b525f4f56f458d88b66be73cae2d1fc5b382db4 (patch) | |
| tree | fd81f7d294951ad81ff0f0e2120cf0e4ad24f244 | |
| parent | 9fac0e70e3f5b7d0b12b77cac50078e01f68ee70 (diff) | |
| download | emacs-5b525f4f56f458d88b66be73cae2d1fc5b382db4.tar.gz emacs-5b525f4f56f458d88b66be73cae2d1fc5b382db4.zip | |
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.
| -rw-r--r-- | lisp/cedet/semantic/analyze/complete.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-find.el | 8 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-ref.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-typecache.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/util.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/srecode/compile.el | 2 | ||||
| -rw-r--r-- | 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 7d31ec7fc07..b471c0d1a13 100644 --- a/lisp/cedet/semantic/analyze/complete.el +++ b/lisp/cedet/semantic/analyze/complete.el | |||
| @@ -89,7 +89,7 @@ in a buffer." | |||
| 89 | ;;(semantic-refresh-tags-safe) | 89 | ;;(semantic-refresh-tags-safe) |
| 90 | (if (semantic-active-p) | 90 | (if (semantic-active-p) |
| 91 | (with-syntax-table semantic-lex-syntax-table | 91 | (with-syntax-table semantic-lex-syntax-table |
| 92 | (let* ((context (if (semantic-analyze-context-child-p context) | 92 | (let* ((context (if (cl-typep context 'semantic-analyze-context) |
| 93 | context | 93 | context |
| 94 | (semantic-analyze-current-context context))) | 94 | (semantic-analyze-current-context context))) |
| 95 | (ans (if (not context) | 95 | (ans (if (not context) |
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 50b1afbf81e..fd6951b59df 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'." | |||
| 362 | "Are there any incomplete entries in CACHE?" | 362 | "Are there any incomplete entries in CACHE?" |
| 363 | (let ((ans nil)) | 363 | (let ((ans nil)) |
| 364 | (dolist (tab cache) | 364 | (dolist (tab cache) |
| 365 | (when (and (semanticdb-table-child-p tab) | 365 | (when (and (cl-typep tab 'semanticdb-table) |
| 366 | (not (number-or-marker-p (oref tab pointmax)))) | 366 | (not (number-or-marker-p (oref tab pointmax)))) |
| 367 | (setq ans t)) | 367 | (setq ans t)) |
| 368 | ) | 368 | ) |
| @@ -402,7 +402,7 @@ Default action as described in `semanticdb-find-translate-path'." | |||
| 402 | (semantic-buffer-local-value 'semanticdb-current-table path)) | 402 | (semantic-buffer-local-value 'semanticdb-current-table path)) |
| 403 | ((and (stringp path) (file-exists-p path)) | 403 | ((and (stringp path) (file-exists-p path)) |
| 404 | (semanticdb-file-table-object path t)) | 404 | (semanticdb-file-table-object path t)) |
| 405 | ((semanticdb-abstract-table-child-p path) | 405 | ((cl-typep path 'semanticdb-abstract-table) |
| 406 | path) | 406 | path) |
| 407 | (t nil)))) | 407 | (t nil)))) |
| 408 | (if table | 408 | (if table |
| @@ -910,7 +910,7 @@ This query only really tests the first entry in the list that is RESULTP, | |||
| 910 | but should be good enough for debugging assertions." | 910 | but should be good enough for debugging assertions." |
| 911 | (and (listp resultp) | 911 | (and (listp resultp) |
| 912 | (listp (car resultp)) | 912 | (listp (car resultp)) |
| 913 | (semanticdb-abstract-table-child-p (car (car resultp))) | 913 | (cl-typep (car (car resultp)) 'semanticdb-abstract-table) |
| 914 | (or (semantic-tag-p (car (cdr (car resultp)))) | 914 | (or (semantic-tag-p (car (cdr (car resultp)))) |
| 915 | (null (car (cdr (car resultp))))))) | 915 | (null (car (cdr (car resultp))))))) |
| 916 | 916 | ||
| @@ -938,7 +938,7 @@ but should be good enough for debugging assertions." | |||
| 938 | (and (listp resultp) | 938 | (and (listp resultp) |
| 939 | (listp (car resultp)) | 939 | (listp (car resultp)) |
| 940 | (let ((tag-to-test (car-safe (cdr (car resultp))))) | 940 | (let ((tag-to-test (car-safe (cdr (car resultp))))) |
| 941 | (or (and (semanticdb-abstract-table-child-p (car (car resultp))) | 941 | (or (and (cl-typep (car (car resultp)) 'semanticdb-abstract-table) |
| 942 | (or (semantic-tag-p tag-to-test) | 942 | (or (semantic-tag-p tag-to-test) |
| 943 | (null tag-to-test))) | 943 | (null tag-to-test))) |
| 944 | (and (null (car (car resultp))) | 944 | (and (null (car (car resultp))) |
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index cfe5c366b54..eb32d0dc63e 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." | |||
| 88 | (while refs | 88 | (while refs |
| 89 | (let* ((ok t) | 89 | (let* ((ok t) |
| 90 | (db (car refs)) | 90 | (db (car refs)) |
| 91 | (f (when (semanticdb-table-child-p db) | 91 | (f (when (cl-typep db 'semanticdb-table) |
| 92 | (semanticdb-full-filename db))) | 92 | (semanticdb-full-filename db))) |
| 93 | ) | 93 | ) |
| 94 | 94 | ||
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index fe9d2d21056..7e0f52fe0b3 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.") | |||
| 114 | (defun semanticdb-typecache-length (thing) | 114 | (defun semanticdb-typecache-length (thing) |
| 115 | "How long is THING? | 115 | "How long is THING? |
| 116 | Debugging function." | 116 | Debugging function." |
| 117 | (cond ((semanticdb-typecache-child-p thing) | 117 | (cond ((cl-typep thing 'semanticdb-typecache) |
| 118 | (length (oref thing stream))) | 118 | (length (oref thing stream))) |
| 119 | ((semantic-tag-p thing) | 119 | ((semantic-tag-p thing) |
| 120 | (length (semantic-tag-type-members thing))) | 120 | (length (semantic-tag-type-members thing))) |
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index 943f9c78ef0..6b1cc61198c 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." | |||
| 119 | ((and (featurep 'semantic/db) | 119 | ((and (featurep 'semantic/db) |
| 120 | (require 'semantic/db-mode) | 120 | (require 'semantic/db-mode) |
| 121 | (semanticdb-minor-mode-p) | 121 | (semanticdb-minor-mode-p) |
| 122 | (semanticdb-abstract-table-child-p something)) | 122 | (cl-typep something 'semanticdb-abstract-table)) |
| 123 | (semanticdb-refresh-table something) | 123 | (semanticdb-refresh-table something) |
| 124 | (semanticdb-get-tags something)) | 124 | (semanticdb-get-tags something)) |
| 125 | ;; Semanticdb find-results | 125 | ;; Semanticdb find-results |
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 586ed0ab0e8..834cbff6032 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." | |||
| 617 | (princ ") ") | 617 | (princ ") ") |
| 618 | (cond ((stringp (car code)) | 618 | (cond ((stringp (car code)) |
| 619 | (prin1 (car code))) | 619 | (prin1 (car code))) |
| 620 | ((srecode-template-inserter-child-p (car code)) | 620 | ((cl-typep (car code) 'srecode-template-inserter) |
| 621 | (srecode-dump (car code) indent)) | 621 | (srecode-dump (car code) indent)) |
| 622 | (t | 622 | (t |
| 623 | (princ "Unknown Code: ") | 623 | (princ "Unknown Code: ") |
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index 63635e5ccda..1058024d457 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el | |||
| @@ -172,7 +172,7 @@ associated with a buffer or parent." | |||
| 172 | initfrombuff t)) | 172 | initfrombuff t)) |
| 173 | 173 | ||
| 174 | ;; Parent is another dictionary | 174 | ;; Parent is another dictionary |
| 175 | ((srecode-dictionary-child-p buffer-or-parent) | 175 | ((cl-typep buffer-or-parent 'srecode-dictionary) |
| 176 | (setq parent buffer-or-parent | 176 | (setq parent buffer-or-parent |
| 177 | buffer (oref buffer-or-parent buffer) | 177 | buffer (oref buffer-or-parent buffer) |
| 178 | origin (concat (eieio-object-name buffer-or-parent) " in " | 178 | origin (concat (eieio-object-name buffer-or-parent) " in " |
| @@ -356,7 +356,7 @@ values but STATE is nil." | |||
| 356 | (srecode-dictionary-set-value dict name value)) | 356 | (srecode-dictionary-set-value dict name value)) |
| 357 | 357 | ||
| 358 | ;; Value is a dictionary; insert as child dictionary. | 358 | ;; Value is a dictionary; insert as child dictionary. |
| 359 | ((srecode-dictionary-child-p value) | 359 | ((cl-typep value 'srecode-dictionary) |
| 360 | (srecode-dictionary-merge | 360 | (srecode-dictionary-merge |
| 361 | (srecode-dictionary-add-section-dictionary dict name) | 361 | (srecode-dictionary-add-section-dictionary dict name) |
| 362 | value t)) | 362 | value t)) |
| @@ -523,7 +523,7 @@ inserted with a new editable field.") | |||
| 523 | ;; No default value. | 523 | ;; No default value. |
| 524 | ((not dv) (insert name)) | 524 | ((not dv) (insert name)) |
| 525 | ;; A compound value as the default? Recurse. | 525 | ;; A compound value as the default? Recurse. |
| 526 | ((srecode-dictionary-compound-value-child-p dv) | 526 | ((cl-typep dv 'srecode-dictionary-compound-value) |
| 527 | (srecode-compound-toString dv function dictionary)) | 527 | (srecode-compound-toString dv function dictionary)) |
| 528 | ;; A string that is empty? Use the name. | 528 | ;; A string that is empty? Use the name. |
| 529 | ((and (stringp dv) (string= dv "")) | 529 | ((and (stringp dv) (string= dv "")) |
| @@ -659,7 +659,7 @@ STATE is the current compiler state." | |||
| 659 | )) | 659 | )) |
| 660 | (princ "\n") | 660 | (princ "\n") |
| 661 | ) | 661 | ) |
| 662 | ((srecode-dictionary-compound-value-child-p entry) | 662 | ((cl-typep entry 'srecode-dictionary-compound-value) |
| 663 | (srecode-dump entry indent) | 663 | (srecode-dump entry indent) |
| 664 | (princ "\n") | 664 | (princ "\n") |
| 665 | ) | 665 | ) |