Mercurial > emacs
diff lisp/calc/calc-ext.el @ 108617:429144ae3b54
calc-ext.el (math-group-float): Have the number of digits being
grouped depend on the radix (Bug#6189).
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Sat, 15 May 2010 21:18:52 -0500 |
parents | c84578d13e42 |
children | d150a25a0eb9 |
line wrap: on
line diff
--- a/lisp/calc/calc-ext.el Sat May 15 17:30:14 2010 -0700 +++ b/lisp/calc/calc-ext.el Sat May 15 21:18:52 2010 -0500 @@ -3469,7 +3469,8 @@ (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))