1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

calc-ext.el (math-group-float): Have the number of digits being

grouped depend on the radix (Bug#6189).
This commit is contained in:
Jay Belanger 2010-05-15 21:18:52 -05:00
parent 9beab9ced3
commit eba62f7a59
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-05-16 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-ext.el (math-group-float): Have the number of digits
being grouped depend on the radix (Bug#6189).
2010-05-15 Ken Raeburn <raeburn@raeburn.org>
* version.el (emacs-copyright, emacs-version): Don't define here,

View File

@ -3469,7 +3469,8 @@ If X is not an error form, return 1."
(defun math-group-float (str) ; [X X]
(let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str)))
(g (if (integerp calc-group-digits) (math-abs calc-group-digits) 3))
(g (if (integerp calc-group-digits) (math-abs calc-group-digits)
(if (memq calc-number-radix '(2 16)) 4 3)))
(i pt))
(if (and (integerp calc-group-digits) (< calc-group-digits 0))
(while (< (setq i (+ (1+ i) g)) (length str))