all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: 13056@debbugs.gnu.org
Subject: bug#13056: 24.2.50; sort-subr doc-string and manual
Date: Sun, 02 Dec 2012 18:45:17 +0100	[thread overview]
Message-ID: <50BB93AD.7070900@gmx.at> (raw)

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	other threads:[~2012-12-02 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-02 17:45 martin rudalics [this message]
2012-12-21  3:18 ` bug#13056: 24.2.50; sort-subr doc-string and manual Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BB93AD.7070900@gmx.at \
    --to=rudalics@gmx.at \
    --cc=13056@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.