diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2010-05-15 21:18:52 -0500 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2010-05-15 21:18:52 -0500 |
commit | eba62f7a5950e77d207ea233a10597f2c9639b0b (patch) | |
tree | dc6db3aa8bdc1acf2aab4c43c20b88d6d62752e3 /lisp | |
parent | 9beab9ced31b55d5f7fbed0c3651d10c64ae8af2 (diff) | |
download | emacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.tar.gz emacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.tar.bz2 emacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.zip |
calc-ext.el (math-group-float): Have the number of digits being
grouped depend on the radix (Bug#6189).
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/calc/calc-ext.el | 3 |
2 files changed, 7 insertions, 1 deletions
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 <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, 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)) |