aboutsummaryrefslogtreecommitdiff
path: root/compat-30.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-05-17 18:27:09 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2024-05-17 18:27:09 +0200
commit84641a11e87e68d3c5e37d2be45cc6777301b211 (patch)
tree991990a4da2c8e031e34698a08d4cdb57b6703b1 /compat-30.el
parentf4c38110b4e9ca4215d72c2da639c53f8fdb7100 (diff)
value<: Fix behavior for values of equal type.
Diffstat (limited to 'compat-30.el')
-rw-r--r--compat-30.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/compat-30.el b/compat-30.el
index 830d0c8..d9d1527 100644
--- a/compat-30.el
+++ b/compat-30.el
@@ -272,7 +272,10 @@ Other types are considered unordered and the return value will be ‘nil’."
(while (and (< i n) (equal (aref a i) (aref b i)))
(cl-incf i))
(if (< i n) (value< (aref a i) (aref b i)) (< n nb))))
- ;; TODO Add support for more types.
+ ;; TODO Add support for more types here.
+ ;; Other values of equal type are considered unordered (return value nil).
+ ((eq (type-of a) (type-of b)) nil)
+ ;; Different types.
(t (error "value< unsupported type: %S %S" a b))))
(compat-defun sort (seq &optional lessp &rest rest) ;; <compat-tests:sort>