[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat ac0ff4c7eb 65/77: value<: Compare buffers by nam
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat ac0ff4c7eb 65/77: value<: Compare buffers by name |
Date: |
Mon, 24 Jun 2024 12:59:04 -0400 (EDT) |
branch: externals/compat
commit ac0ff4c7eb28f8065d8a0c3edc8761f20a6d4d9c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
value<: Compare buffers by name
---
compat-30.el | 6 ++++++
compat-tests.el | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/compat-30.el b/compat-30.el
index d9d152791f..43dc9d1408 100644
--- a/compat-30.el
+++ b/compat-30.el
@@ -256,6 +256,12 @@ Other types are considered unordered and the return value
will be ‘nil’."
((or (and (stringp a) (stringp b))
(and (symbolp a) (symbolp b)))
(string< a b))
+ ((and (bufferp a) (bufferp b))
+ (setq a (buffer-name a)
+ b (buffer-name b))
+ (cond
+ ((and a b) (string< a b))
+ (b t)))
((and (listp a) (listp b))
(while (and (consp a) (consp b) (equal (car a) (car b)))
(setq a (cdr a) b (cdr b)))
diff --git a/compat-tests.el b/compat-tests.el
index de86214f85..ece115c2d7 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1810,7 +1810,9 @@
(compat--should-value< [1 2] [2 3])
(compat--should-value< [1 2 3] [2])
(compat--should-value< [0 1 2] [0 2 3])
- (compat--should-value< [0 1 2 3] [0 2]))
+ (compat--should-value< [0 1 2 3] [0 2])
+ ;; Buffers are compared by name
+ (compat--should-value< (get-buffer-create "a") (get-buffer-create "b")))
(ert-deftest compat-sort ()
(should-equal (list 1 2 3) (sort (list 1 2 3) #'<))
- [elpa] externals/compat 38aba13d75 62/77: compat-30: Make value< type checking more strict, (continued)
- [elpa] externals/compat 38aba13d75 62/77: compat-30: Make value< type checking more strict, ELPA Syncer, 2024/06/24
- [elpa] externals/compat 84641a11e8 64/77: value<: Fix behavior for values of equal type., ELPA Syncer, 2024/06/24
- [elpa] externals/compat e8c9f3bbd3 68/77: sort: Fix handling of :reverse argument, ELPA Syncer, 2024/06/24
- [elpa] externals/compat ec06bc858f 66/77: value<: Processes are compared by name., ELPA Syncer, 2024/06/24
- [elpa] externals/compat b12b2e5cbe 69/77: compat-30: Ensure that list is not sorted destructively on Emacs 24.4, ELPA Syncer, 2024/06/24
- [elpa] externals/compat 0b4f2eafa4 70/77: compat-30: Add obarray-clear, ELPA Syncer, 2024/06/24
- [elpa] externals/compat 2f14cbb732 71/77: Revert "Remove unnecessary dir-locals", ELPA Syncer, 2024/06/24
- [elpa] externals/compat 3748c0b0c1 72/77: Merge branch 'main' into emacs-30, ELPA Syncer, 2024/06/24
- [elpa] externals/compat f4c38110b4 63/77: compat-30: Add primitive-function-p, interpreted-function-p and closurep, ELPA Syncer, 2024/06/24
- [elpa] externals/compat d59333f9a1 67/77: value<: Update error message, ELPA Syncer, 2024/06/24
- [elpa] externals/compat ac0ff4c7eb 65/77: value<: Compare buffers by name,
ELPA Syncer <=
- [elpa] externals/compat 492c0d1db1 73/77: compat-28: Mark subr-native-elisp-p as obsolete, ELPA Syncer, 2024/06/24
- [elpa] externals/compat cb80953113 76/77: Merge branch 'main' into emacs-30, ELPA Syncer, 2024/06/24
- [elpa] externals/compat e4b7ab3358 77/77: compat-30: value< Remove obsolete comment, ELPA Syncer, 2024/06/24
- [elpa] externals/compat 00e3c3034b 74/77: compat-28: Fix links to tests, ELPA Syncer, 2024/06/24