summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-ext.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2010-05-15 21:18:52 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2010-05-15 21:18:52 -0500
commiteba62f7a5950e77d207ea233a10597f2c9639b0b (patch)
treedc6db3aa8bdc1acf2aab4c43c20b88d6d62752e3 /lisp/calc/calc-ext.el
parent9beab9ced31b55d5f7fbed0c3651d10c64ae8af2 (diff)
downloademacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.tar.gz
calc-ext.el (math-group-float): Have the number of digits being
grouped depend on the radix (Bug#6189).
Diffstat (limited to 'lisp/calc/calc-ext.el')
-rw-r--r--lisp/calc/calc-ext.el3
1 files changed, 2 insertions, 1 deletions
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))