emacs-diffs
[Top][All Lists]
Advanced

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

master 0d6f3f134e4 3/6: Generalize 'comp-cstr-symbol-p'


From: Andrea Corallo
Subject: master 0d6f3f134e4 3/6: Generalize 'comp-cstr-symbol-p'
Date: Thu, 11 Jul 2024 10:27:29 -0400 (EDT)

branch: master
commit 0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>

    Generalize 'comp-cstr-symbol-p'
    
    * lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Make use of
    'comp-cstr-type-p'.
---
 lisp/emacs-lisp/comp-cstr.el | 13 ++++---------
 1 file 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'."
                       (> high most-positive-fixnum))
             t))))))
 
-(defun comp-cstr-symbol-p (cstr)
-  "Return t if CSTR is certainly a symbol."
-  (with-comp-cstr-accessors
-    (and (null (range cstr))
-         (null (neg cstr))
-         (and (or (null (typeset cstr))
-                  (equal (typeset cstr) '(symbol)))
-              (cl-every #'symbolp (valset cstr))))))
-
 (defsubst comp-cstr-cons-p (cstr)
   "Return t if CSTR is certainly a cons."
   (with-comp-cstr-accessors
@@ -965,6 +956,10 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
              (error "Unknown predicate for type %s" type)))))
     t))
 
+(defun comp-cstr-symbol-p (cstr)
+  "Return t if CSTR is certainly a symbol."
+  (comp-cstr-type-p cstr 'symbol))
+
 ;; Move to comp.el?
 (defsubst comp-cstr-cl-tag-p (cstr)
   "Return non-nil if CSTR is a CL tag."



reply via email to

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