summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2024-03-22 15:08:50 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2024-03-29 11:39:38 +0100
commit92d659ce6cd2e79231f1011202abb39606d6f06b (patch)
tree56928b6aaeb1e38f23f719a08da30e6211f82ef4
parent45941a62c799f9685fae296079304ae0898920cc (diff)
downloademacs-92d659ce6cd2e79231f1011202abb39606d6f06b.tar.gz
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).
-rw-r--r--doc/lispref/help.texi2
-rw-r--r--doc/lispref/strings.texi7
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 6a9dd589237..7f640255a7a 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