|Subject:||bug#18051: [Emacs-diffs] trunk r117726: Add string collation.|
|Date:||Wed, 27 Aug 2014 12:08:52 -0700|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0|
A couple more things.First, the current algorithm looks only at LC_COLLATE, but the usual approach is to default LC_COLLATE to LANG if LC_COLLATE isn't set, and to have LC_ALL override LC_COLLATE. Shouldn't Emacs take a similar approach, for compatibility?
More generally, it strikes me that string-collate-lessp will be quite slow due to the overhead of looking up the locale environment string and creating and destroying a locale for each string comparison. Instead, shouldn't Emacs should have a locale object that the Emacs Lisp programmer can create, an object that encapsulates the low level locale_t object, and which can be passed as an optional argument to string-collate-lessp? That way, string-collate-p would never have to inspect the environment itself, or to create or destroy a locale.
|[Prev in Thread]||Current Thread||[Next in Thread]|