bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13056: 24.2.50; sort-subr doc-string and manual


From: martin rudalics
Subject: bug#13056: 24.2.50; sort-subr doc-string and manual
Date: Sun, 02 Dec 2012 18:45:17 +0100

The doc-string of `sort-subr' says that

  PREDICATE is the function to use to compare keys.  If keys are numbers,
  it defaults to `<', otherwise it defaults to `string<'.

and the Elisp manual says something similar.  This is slightly
misleading ever since this change

1993-02-07  Richard Stallman  (rms@mole.gnu.ai.mit.edu)

        * sort.el (sort-build-lists): Record the key as pair of positions;
        don't copy string from buffer.
        (sort-subr): Use compare-buffer-substrings.

If keys are not numbers, the two arguments passed to PREDICATE are
usually pairs of buffer positions and PREDICATE has to extract the keys
from these positions first.  Only if STARTKEYFUN was set to explicitly
return a string, the description above is valid and the keys passed to
PREDICATE can be used directly by `string<'.  In any case, it seems more
correct to say that PREDICATE defaults to `compare-buffer-substrings'.

martin, in GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-11-24 on MACHNO





reply via email to

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