changeset 106140:a90a5967d392

(calc-init-extentions): Rename `calc-complement-signed-mode' to `calc-twos-complement-mode'. (math-format-number-fancy): Let `calc-twos-complement-mode' be nil.
author Jay Belanger <jay.p.belanger@gmail.com>
date Fri, 20 Nov 2009 00:57:32 +0000
parents 92448fe233b3
children 48809da14a0f
files lisp/calc/calc-ext.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-ext.el	Fri Nov 20 00:56:59 2009 +0000
+++ b/lisp/calc/calc-ext.el	Fri Nov 20 00:57:32 2009 +0000
@@ -987,7 +987,7 @@
 calc-floor calc-idiv calc-increment calc-mant-part calc-max calc-min
 calc-round calc-scale-float calc-sign calc-trunc calc-xpon-part)
 
- ("calc-bin" calc-and calc-binary-radix calc-clip calc-complement-signed-mode
+ ("calc-bin" calc-and calc-binary-radix calc-clip calc-twos-complement-mode
 calc-decimal-radix calc-diff calc-hex-radix calc-leading-zeros 
 calc-lshift-arith calc-lshift-binary calc-not calc-octal-radix calc-or calc-radix
 calc-rotate-binary calc-rshift-arith calc-rshift-binary calc-word-size
@@ -2998,7 +2998,7 @@
     (math-read-radix (math-match-substring s 3)
 		     (string-to-number (math-match-substring s 1))))
 
-   ;; Complement signed with explicit radix
+   ;; Two's complement with explicit radix
    ((string-match "^\\([0-9]+\\)\\(##\\)\\([0-9a-zA-Z]+\\)$" s)
     (let ((num (math-read-radix (math-match-substring s 3)
                                 (string-to-number (math-match-substring s 1)))))
@@ -3354,6 +3354,7 @@
     (if (math-negp a)
 	(concat "-" (math-format-number (math-neg a)))
       (let ((calc-number-radix 10)
+            (calc-twos-complement-mode nil)
 	    (calc-leading-zeros nil)
 	    (calc-group-digits nil))
 	(format calc-hms-format