emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 4512cd5ab1 13/14: Remove :realname from proper-l


From: ELPA Syncer
Subject: [elpa] externals/compat 4512cd5ab1 13/14: Remove :realname from proper-list-p
Date: Tue, 3 Jan 2023 13:57:27 -0500 (EST)

branch: externals/compat
commit 4512cd5ab157892f0a0263c25dd3203a7bd76e49
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Remove :realname from proper-list-p
---
 compat-27.el    |  5 ++---
 compat-tests.el | 17 +----------------
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index e8798e4514..f38c65c5a5 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -46,9 +46,8 @@ A proper list is neither circular nor dotted (i.e., its last 
cdr
 is nil)."
   :min-version "26.1"
   :max-version "26.3"
-  :realname compat--proper-list-p-length-signal
   (condition-case nil
-      (and (listp object) (length object))
+      (and (listp object) (length object)) ;; Throws a signal
     (wrong-type-argument nil)
     (circular-list nil)))
 
@@ -57,7 +56,7 @@ is nil)."
 A proper list is neither circular nor dotted (i.e., its last cdr
 is nil)."
   :max-version "25.3"
-  :realname compat--proper-list-p-tortoise-hare
+  ;; On Emacs older than 25.3 we have to use the Tortoise and Hare algorithm
   (when (listp object)
     (catch 'cycle
       (let ((hare object) (tortoise object)
diff --git a/compat-tests.el b/compat-tests.el
index 0c59a88746..a3b1834293 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -457,7 +457,7 @@ being compared against."
   (ought '(1 2 3) '(1 2 3))                ;multiple element list
   (ought '(1) 1))                          ;atom
 
-(compat-deftests (proper-list-p compat--proper-list-p-length-signal)
+(compat-deftests proper-list-p
   (ought 0 ())                         ;empty list
   (ought 1 '(1))                               ;single element
   (ought 3 '(1 2 3))                   ;multiple elements
@@ -472,21 +472,6 @@ being compared against."
   (ought nil [])
   (ought nil [1 2 3]))
 
-(compat-deftests (proper-list-p compat--proper-list-p-tortoise-hare)
-  (ought 0 ())                         ;empty list
-  (ought 1 '(1))                        ;single element
-  (ought 3 '(1 2 3))                   ;multiple elements
-  (ought nil '(1 . 2))                 ;cons
-  (ought nil '(1 2 . 3))                ;dotted
-  (ought nil (let ((l (list 1 2 3)))    ;circular
-               (setf (nthcdr 3 l) l)
-               l))
-  (ought nil 1)                         ;non-lists
-  (ought nil "")
-  (ought nil "abc")
-  (ought nil [])
-  (ought nil [1 2 3]))
-
 (compat-deftests flatten-tree
   ;; Example from docstring:
   (ought '(1 2 3 4 5 6 7) '(1 (2 . 3) nil (4 5 (6)) 7))



reply via email to

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