[Top][All Lists]

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

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

From: Paul Eggert
Subject: bug#18051: [Emacs-diffs] trunk r117726: Add string collation.
Date: Wed, 27 Aug 2014 14:27:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Eli Zaretskii wrote:

I think we agreed to have a variable that holds the non-default locale
as a Lisp string.

Ah, sorry, missed that (it is a long thread...). Makes sense. I assume this is on someone's TODO list since it's not done that way now.

Perhaps binding a variable to the object will do.

We could do both: i.e., give the comparison function an optional argument that defaults to the value of the bound variable. I'd think the value should be a locale object, though, not a string like "en_US". And perhaps the object should also record whether the comparison is case-sensitive, and other stuff like that.

Alternatively, a simple one-slot cache internal to string_collate will
probably remove most of the overhead.

It would now, but it would also add another obstacle to adding multithreading capabilities, as the locking around the cache would inhibit scalability. So I'd rather avoid such a cache if it's easy.

reply via email to

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