Fix calc number formatting with digit grouping (bug#36689)
commita87840fffbf471d53eba17ea683728125d2d4767
authorMattias Engdegård <mattiase@acm.org>
Tue, 16 Jul 2019 15:18:32 +0000 (16 17:18 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 16 Jul 2019 15:37:46 +0000 (16 17:37 +0200)
tree3529d052a679c420f27a7d44bdbb8d80d9f7779d
parent0a2461be9edb218bf9ca56156d8966a2421f13a7
Fix calc number formatting with digit grouping (bug#36689)

The functions math-format-hex and math-format-octal were not
implemented, yet called, leading to a crash when using hex or octal
radix with digit grouping.

* test/lisp/calc/calc-tests.el (calc-test-format-radix): New test.
* lisp/calc/calc-ext.el: Don't declare non-existing functions.
(math--format-integer-fancy): Don't call non-existing functions.
* lisp/calc/calc-bin.el (math-format-binary, math-binary-digits):
Simplify, fixing 0-padding bug.
lisp/calc/calc-bin.el
lisp/calc/calc-ext.el
test/lisp/calc/calc-tests.el