summaryrefslogtreecommitdiff
path: root/doc/lispref/strings.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/strings.texi')
-rw-r--r--doc/lispref/strings.texi7
1 files changed, 4 insertions, 3 deletions
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