From: Chong Yidong Date: Fri, 21 Dec 2012 03:17:57 +0000 (+0800) Subject: * sort.el (sort-subr): Doc fix. X-Git-Tag: emacs-24.2.92~119 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=594f37aae9e830d5a1462dd59b52675d47782153;p=emacs.git * sort.el (sort-subr): Doc fix. Fixes: debbugs:13056 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0403e2f682a..642bb783624 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-21 Chong Yidong + + * sort.el (sort-subr): Doc fix (Bug#13056). + 2012-12-20 Bastien Guerry * ldefs-boot.el (tags-search): Fix typo. diff --git a/lisp/sort.el b/lisp/sort.el index 44f90fff379..5c4bc418965 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -77,8 +77,13 @@ ENDKEYFUN moves from the start of the sort key to the end of the sort key. ENDKEYFUN may be nil if STARTKEYFUN returns a value or if it would be the same as ENDRECFUN. -PREDICATE is the function to use to compare keys. If keys are numbers, -it defaults to `<', otherwise it defaults to `string<'." +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 +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." ;; Heuristically try to avoid messages if sorting a small amt of text. (let ((messages (> (- (point-max) (point-min)) 50000))) (save-excursion