[Top][All Lists]

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

Re: RFC: locale-sensitive Emacs functions

From: Gdobbins
Subject: Re: RFC: locale-sensitive Emacs functions
Date: Tue, 28 Mar 2017 00:10:50 -0400

In Common Lisp, such directives use : rather than ', but more importantly they also take arguments to specify the grouping and the separation character. They default to 3 and comma respectively. If Emacs' format were to allow similar arguments to be provided, it would allow the exact format to be specified where it is important and the user could set global variables like default-digit-grouping and default-digit-separator or some such to get behavior matching their locale. For example:

(format "%:d" 100000) => "100,000"

(let ((default-digit-grouping 4)
       (default-digit-separator ?.))
  (format "%:d" 100000)) => "10.0000"

-- Graham Dobbins

reply via email to

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