bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal


From: Glenn Morris
Subject: bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?
Date: Wed, 27 Aug 2014 11:48:36 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Michael Albinus wrote:

>>     (sort foo (lambda (x y) (string-lessp x y 'optional-arg)))
>
> Yes, but this would also expect optional-arg to be a variable which can
> be set by the user.

I'm missing something, because I don't get why you want me to write (in
authors.el):

(let ((process-environment
       (cons "LC_COLLATE=en_US.UTF-8"
             process-environment)))
  (sort authors-author-list
        (lambda (a b) (string-collate-lessp (car a) (car b)))))

rather than the obviously-better:

(sort authors-author-list
      (lambda (a b) (string-collate-lessp (car a) (car b) "en_US.UTF-8")))

Normally one controls functions through their arguments, not the
environment.





reply via email to

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