diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-17 18:36:01 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-17 18:36:01 +0200 |
| commit | ec06bc858fc40a377dc213b5cc344d029a836144 (patch) | |
| tree | 6857c966fd0c222a88fe3d66f484c68a57e637c0 /compat-30.el | |
| parent | ac0ff4c7eb28f8065d8a0c3edc8761f20a6d4d9c (diff) | |
value<: Processes are compared by name.
Diffstat (limited to 'compat-30.el')
| -rw-r--r-- | compat-30.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/compat-30.el b/compat-30.el index 43dc9d1..e0a8def 100644 --- a/compat-30.el +++ b/compat-30.el @@ -256,12 +256,6 @@ 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))) @@ -278,6 +272,15 @@ 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)))) + ((and (bufferp a) (bufferp b)) + ;; `buffer-name' is nil for killed buffers. + (setq a (buffer-name a) + b (buffer-name b)) + (cond + ((and a b) (string< a b)) + (b t))) + ((and (processp a) (processp b)) + (string< (process-name a) (process-name b))) ;; 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) |
