diff options
author | Glenn Morris <rgm@gnu.org> | 2012-12-21 11:32:43 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-12-21 11:32:43 -0800 |
commit | a4b0cca119b01dc55bad802ef696c857fe014482 (patch) | |
tree | f2df86b3d472d15d3bbb69274325a7c0090f65b3 /lisp/sort.el | |
parent | 0e9c7693712014196946a83709a83c08a7dfea25 (diff) | |
parent | 160b3852018831b830a7451f29f770fb49810342 (diff) | |
download | emacs-a4b0cca119b01dc55bad802ef696c857fe014482.tar.gz emacs-a4b0cca119b01dc55bad802ef696c857fe014482.tar.bz2 emacs-a4b0cca119b01dc55bad802ef696c857fe014482.zip |
Merge from emacs-24; up to 2012-12-01T13:25:13Z!cyd@gnu.org
Diffstat (limited to 'lisp/sort.el')
-rw-r--r-- | lisp/sort.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/sort.el b/lisp/sort.el index cd0b4433ab3..7a3adfdc5e3 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 |