[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/sort-key 592ca5070e2 10/11: Use new-style sort signature in Lisp
From: |
Mattias Engdegård |
Subject: |
scratch/sort-key 592ca5070e2 10/11: Use new-style sort signature in Lisp manual examples |
Date: |
Sat, 23 Mar 2024 09:19:36 -0400 (EDT) |
branch: scratch/sort-key
commit 592ca5070e209dc293ad3be2348dfef801bf0ed1
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Use new-style sort signature in Lisp manual examples
* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/strings.texi (Text Comparison):
Use the new sort calling convention (bug#69709).
---
doc/lispref/help.texi | 2 +-
doc/lispref/strings.texi | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a76bac011b7..4236fa75bf0 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -231,7 +231,7 @@ in the *Help* buffer."
(help-setup-xref (list 'describe-symbols pattern)
(called-interactively-p 'interactive))
(with-help-window (help-buffer)
- (mapcar describe-func (sort sym-list 'string<)))))
+ (mapcar describe-func (sort sym-list)))))
@end group
@end smallexample
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 130e82f6f9b..1466c863ecc 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -692,7 +692,8 @@ for sorting (@pxref{Sequence Functions}):
@example
@group
-(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+ :lessp #'string-collate-lessp)
@result{} ("11" "1 1" "1.1" "12" "1 2" "1.2")
@end group
@end example
@@ -709,8 +710,8 @@ systems. The @var{locale} value of @code{"POSIX"} or
@code{"C"} lets
@example
@group
-(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2")
- (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+ :lessp (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
@result{} ("1 1" "1 2" "1.1" "1.2" "11" "12")
@end group
@end example
- 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, 2024/03/23
- 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 <=
- scratch/sort-key ed59a2639a9 11/11: Remove sort-on, Mattias Engdegård, 2024/03/23