--- Begin Message ---
Subject: |
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 (address@hidden)
* 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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#13056: 24.2.50; sort-subr doc-string and manual |
Date: |
Fri, 21 Dec 2012 11:18:20 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) |
martin rudalics <address@hidden> writes:
> 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 (address@hidden)
>
> * sort.el (sort-build-lists): Record the key as pair of positions;
> don't copy string from buffer.
> (sort-subr): Use compare-buffer-substrings.
Fixed, thanks.
--- End Message ---