diff options
| author | Andrea Corallo | 2024-05-31 10:08:18 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2024-07-11 16:26:49 +0200 |
| commit | 0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5 (patch) | |
| tree | b9653cb9e82376165bf3ccf8e37192805eba1ffa | |
| parent | a1775552cef5a8bc0ba13e802ecf343423a53364 (diff) | |
| download | emacs-0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5.tar.gz emacs-0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5.zip | |
Generalize 'comp-cstr-symbol-p'
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Make use of
'comp-cstr-type-p'.
| -rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 058fc522858..66c44f16835 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el | |||
| @@ -926,15 +926,6 @@ Non memoized version of `comp-cstr-intersection-no-mem'." | |||
| 926 | (> high most-positive-fixnum)) | 926 | (> high most-positive-fixnum)) |
| 927 | t)))))) | 927 | t)))))) |
| 928 | 928 | ||
| 929 | (defun comp-cstr-symbol-p (cstr) | ||
| 930 | "Return t if CSTR is certainly a symbol." | ||
| 931 | (with-comp-cstr-accessors | ||
| 932 | (and (null (range cstr)) | ||
| 933 | (null (neg cstr)) | ||
| 934 | (and (or (null (typeset cstr)) | ||
| 935 | (equal (typeset cstr) '(symbol))) | ||
| 936 | (cl-every #'symbolp (valset cstr)))))) | ||
| 937 | |||
| 938 | (defsubst comp-cstr-cons-p (cstr) | 929 | (defsubst comp-cstr-cons-p (cstr) |
| 939 | "Return t if CSTR is certainly a cons." | 930 | "Return t if CSTR is certainly a cons." |
| 940 | (with-comp-cstr-accessors | 931 | (with-comp-cstr-accessors |
| @@ -965,6 +956,10 @@ Non memoized version of `comp-cstr-intersection-no-mem'." | |||
| 965 | (error "Unknown predicate for type %s" type))))) | 956 | (error "Unknown predicate for type %s" type))))) |
| 966 | t)) | 957 | t)) |
| 967 | 958 | ||
| 959 | (defun comp-cstr-symbol-p (cstr) | ||
| 960 | "Return t if CSTR is certainly a symbol." | ||
| 961 | (comp-cstr-type-p cstr 'symbol)) | ||
| 962 | |||
| 968 | ;; Move to comp.el? | 963 | ;; Move to comp.el? |
| 969 | (defsubst comp-cstr-cl-tag-p (cstr) | 964 | (defsubst comp-cstr-cl-tag-p (cstr) |
| 970 | "Return non-nil if CSTR is a CL tag." | 965 | "Return non-nil if CSTR is a CL tag." |