[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/sort-key 7250e610f51 08/11: Add NEWS entry for new `sort` argume
From: |
Mattias Engdegård |
Subject: |
scratch/sort-key 7250e610f51 08/11: Add NEWS entry for new `sort` arguments and features |
Date: |
Sat, 23 Mar 2024 09:19:35 -0400 (EDT) |
branch: scratch/sort-key
commit 7250e610f5142c7f7e47547de46038b896eabbda
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Add NEWS entry for new `sort` arguments and features
* etc/NEWS: Announce the changes (bug#69709).
---
etc/NEWS | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index a525d84e2f9..4a68737ba5f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1716,6 +1716,24 @@ bool-vectors, markers, buffers and processes.
It is intended as a convenient ordering predicate for sorting, and is
likely to be faster than hand-written Lisp functions.
+** New 'sort' arguments and features.
+The 'sort' function can now be called using the signature
+
+ (sort SEQ &rest KEYWORD-ARGUMENTS)
+
+where arguments after the first are keyword/value pairs, all optional:
+':key' specifies a function that produces the sorting key from an element,
+':lessp' specifies the ordering predicate, defaulting to 'value<',
+':reverse' is used to reverse the sorting order,
+':in-place is used for in-place sorting, as the default is now to
+sort a copy of the input.
+
+The new signature is less error-prone and reduces the need to write
+ordering predicates by hand.
+
+The old signature, '(sort SEQ PREDICATE)', can still be used and sorts
+its input in-place as before.
+
** New function 'sort-on'.
This function implements the Schwartzian transform, and is appropriate
for sorting lists when the computation of the sort key of a list
- branch scratch/sort-key created (now ed59a2639a9), Mattias Engdegård, 2024/03/23
- scratch/sort-key 2dc07013ef2 02/11: Add NEWS entry for value< (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 72d4e3a9d26 01/11: Add value< (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 01e5337293c 04/11: Add back timsort key function handling (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 24bfd3e89d3 06/11: Speed up `sort` by special-casing the value< ordering, Mattias Engdegård, 2024/03/23
- scratch/sort-key 5fe92f3c33a 07/11: Faster non-destructive list sorting, Mattias Engdegård, 2024/03/23
- scratch/sort-key 7250e610f51 08/11: Add NEWS entry for new `sort` arguments and features,
Mattias Engdegård <=
- scratch/sort-key 4de45937313 09/11: Update manual entry for `sort` (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 2cef2a91c13 05/11: New `sort` keyword arguments (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 3a3568784ea 03/11: Add manual entry for value< (bug#69709), Mattias Engdegård, 2024/03/23
- scratch/sort-key 592ca5070e2 10/11: Use new-style sort signature in Lisp manual examples, Mattias Engdegård, 2024/03/23
- scratch/sort-key ed59a2639a9 11/11: Remove sort-on, Mattias Engdegård, 2024/03/23