emacs-diffs
[Top][All Lists]
Advanced

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

master a567faf4c2b 2/2: Add two missing 'number-or-marker' entries to th


From: Andrea Corallo
Subject: master a567faf4c2b 2/2: Add two missing 'number-or-marker' entries to the cl machinery (bug#66615)
Date: Thu, 19 Oct 2023 08:00:37 -0400 (EDT)

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

    Add two missing 'number-or-marker' entries to the cl machinery (bug#66615)
    
    Assuming 'number-or-marker' is a type (as present multiple times in
    cl--typeof-types) adding some missing entries for coherency.
    
    * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
    'number-or-marker' as supertype of 'number' in the 'float' branch.
    
    * lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add
    'number-or-marker'.
    
    * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist):
    Update test.
    
    * test/src/comp-tests.el (comp-tests-type-spec-tests): Update two testes.
---
 lisp/emacs-lisp/cl-macs.el              | 3 ++-
 lisp/emacs-lisp/cl-preloaded.el         | 4 ++--
 test/lisp/emacs-lisp/comp-cstr-tests.el | 2 +-
 test/src/comp-tests.el                  | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 8025a64f1bf..722d561b9f4 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3502,7 +3502,8 @@ Of course, we really can't know that for sure, so it's 
just a heuristic."
                  (symbol       . symbolp)
                  (vector       . vectorp)
                  (window       . windowp)
-                 ;; FIXME: Do we really want to consider this a type?
+                 ;; FIXME: Do we really want to consider these types?
+                 (number-or-marker . number-or-marker-p)
                  (integer-or-marker . integer-or-marker-p)
                  ))
   (put type 'cl-deftype-satisfies pred))
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index 676326980aa..96e288db7d5 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -58,8 +58,8 @@
     ;; Markers aren't `numberp', yet they are accepted wherever integers are
     ;; accepted, pretty much.
     (marker number-or-marker atom)
-    (overlay atom) (float number atom) (window-configuration atom)
-    (process atom) (window atom)
+    (overlay atom) (float number number-or-marker atom)
+    (window-configuration atom) (process atom) (window atom)
     ;; FIXME: We'd want to put `function' here, but that's only true
     ;; for those `subr's which aren't special forms!
     (subr atom)
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el 
b/test/lisp/emacs-lisp/comp-cstr-tests.el
index a4f282fcfef..d2f552af6fa 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -191,7 +191,7 @@
       ;; 74
       ((and boolean (or number marker)) . nil)
       ;; 75
-      ((and atom (or number marker)) . (or marker number))
+      ((and atom (or number marker)) . number-or-marker)
       ;; 76
       ((and symbol (or number marker)) . nil)
       ;; 77
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 4444ab61219..2b3c3dd4c75 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -977,7 +977,7 @@ Return a list of results."
          (if (= x y)
              x
            'foo))
-       '(or (member foo) marker number))
+       '(or (member foo) number-or-marker))
 
       ;; 14
       ((defun comp-tests-ret-type-spec-f (x)
@@ -1117,7 +1117,7 @@ Return a list of results."
       ((defun comp-tests-ret-type-spec-f (x)
         (when (> x 1.0)
           x))
-       '(or null marker number))
+       '(or null number-or-marker))
 
       ;; 36
       ((defun comp-tests-ret-type-spec-f (x y)



reply via email to

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