diff options
| author | Jay Belanger | 2010-05-15 21:18:52 -0500 |
|---|---|---|
| committer | Jay Belanger | 2010-05-15 21:18:52 -0500 |
| commit | eba62f7a5950e77d207ea233a10597f2c9639b0b (patch) | |
| tree | dc6db3aa8bdc1acf2aab4c43c20b88d6d62752e3 | |
| parent | 9beab9ced31b55d5f7fbed0c3651d10c64ae8af2 (diff) | |
| download | emacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.tar.gz emacs-eba62f7a5950e77d207ea233a10597f2c9639b0b.zip | |
calc-ext.el (math-group-float): Have the number of digits being
grouped depend on the radix (Bug#6189).
| -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 @@ | |||
| 1 | 2010-05-16 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc/calc-ext.el (math-group-float): Have the number of digits | ||
| 4 | being grouped depend on the radix (Bug#6189). | ||
| 5 | |||
| 1 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> | 6 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> |
| 2 | 7 | ||
| 3 | * version.el (emacs-copyright, emacs-version): Don't define here, | 8 | * 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." | |||
| 3469 | 3469 | ||
| 3470 | (defun math-group-float (str) ; [X X] | 3470 | (defun math-group-float (str) ; [X X] |
| 3471 | (let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str))) | 3471 | (let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str))) |
| 3472 | (g (if (integerp calc-group-digits) (math-abs calc-group-digits) 3)) | 3472 | (g (if (integerp calc-group-digits) (math-abs calc-group-digits) |
| 3473 | (if (memq calc-number-radix '(2 16)) 4 3))) | ||
| 3473 | (i pt)) | 3474 | (i pt)) |
| 3474 | (if (and (integerp calc-group-digits) (< calc-group-digits 0)) | 3475 | (if (and (integerp calc-group-digits) (< calc-group-digits 0)) |
| 3475 | (while (< (setq i (+ (1+ i) g)) (length str)) | 3476 | (while (< (setq i (+ (1+ i) g)) (length str)) |