emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111047: * sort.el (sort-subr): Do


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111047: * sort.el (sort-subr): Doc fix.
Date: Fri, 21 Dec 2012 11:17:57 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111047
fixes bug: http://debbugs.gnu.org/13056
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-12-21 11:17:57 +0800
message:
  * sort.el (sort-subr): Doc fix.
modified:
  lisp/ChangeLog
  lisp/sort.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-20 08:18:23 +0000
+++ b/lisp/ChangeLog    2012-12-21 03:17:57 +0000
@@ -1,3 +1,7 @@
+2012-12-21  Chong Yidong  <address@hidden>
+
+       * sort.el (sort-subr): Doc fix (Bug#13056).
+
 2012-12-20  Bastien Guerry  <address@hidden>
 
        * ldefs-boot.el (tags-search): Fix typo.

=== modified file 'lisp/sort.el'
--- a/lisp/sort.el      2012-08-03 08:15:24 +0000
+++ b/lisp/sort.el      2012-12-21 03:17:57 +0000
@@ -77,8 +77,13 @@
 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]