diff --git a/lisp/sort.el b/lisp/sort.el index de0e1b9519..e22f062dbd 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -80,7 +80,15 @@ sort-subr PREDICATE, if non-nil, is the predicate function for comparing keys; it is called with two arguments, the keys to compare, and should return non-nil if the first key should sort before the -second key. If PREDICATE is nil, comparison is done with `<' if +second key. The key values PREDICATE is called with are the +either the return values of STARTKEYFUN when that function is +specified and returns a non-nil value. In any other case the keys +are cons cells of the form (BEG . END), where BEG is the value of +point after calling STARTKEYFUN when given, else after calling +ENDRECFUN, and END is the value of point after calling ENDKEYFUN when +given, and after calling ENDRECFUN else. + +If PREDICATE is nil, comparison is done with `<' if the keys are numbers, with `compare-buffer-substrings' if the keys are cons cells (the car and cdr of each cons cell are taken as start and end positions), and with `string<' otherwise."