From: Jay Belanger Date: Sun, 16 May 2010 02:18:52 +0000 (-0500) Subject: calc-ext.el (math-group-float): Have the number of digits being X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~208^2~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eba62f7a5950e77d207ea233a10597f2c9639b0b;p=emacs.git calc-ext.el (math-group-float): Have the number of digits being grouped depend on the radix (Bug#6189). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3dbf2c3224..27574c31d55 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-16 Jay Belanger + + * 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 * version.el (emacs-copyright, emacs-version): Don't define here, diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index c0b6a806372..17dc9293237 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -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))