Subject: bug#18051: [Emacs-diffs] trunk r117726: Add string collation.

From: Michael Albinus <[email-masked]>
Date: Fri, 29 Aug 2014 11:59:00 +0200

martin rudalics <[email-masked]> writes:

> I have not yet started to convert my
> fairly insane sorting functions to the new ones because mine are
> generally based on case-insensitiveness.

I'm just working on this. `string-collate-lessp' will have the signature

(string-collate-lessp S1 S2 &optional LOCALE IGNORE-CASE)

> Also I'm not yet sure how the
> new predicates will relate to functions like `compare-strings' (which
> IIUC is needed until now to make sorting case-insensitive),

Likely, there shall also be `collate-strings'.

> `sort-lines', `sort-subr' and the like.  I'd hope that all of these
> could profit from the new functions.

`sort-subr' has PREDICATE as argument, you could take
`string-collate-lessp'. Maybe with some adaptions in `sort-subr', in
order to use also LOCALE and IGNORE-CASE.

`sort-lines' uses `sort-subr', without PREDIACATE. Might be also extended.

> martin

Best regards, Michael.