summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-menu.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2009-11-16 00:07:07 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2009-11-16 00:07:07 +0000
commitfa2c374a22f4636258b2f79273b929dee22f5d9b (patch)
tree1dc7073657d51ae2f9cd51e83a53de1bd3f7f1db /lisp/calc/calc-menu.el
parent43a4260ead0893c6d55d65b37c78be3a2f22245f (diff)
downloademacs-fa2c374a22f4636258b2f79273b929dee22f5d9b.tar.gz
(calc-arithmetic-menu): Add item for `calc-symclip'.
(calc-modes-menu): Add item for twos complement.
Diffstat (limited to 'lisp/calc/calc-menu.el')
-rw-r--r--lisp/calc/calc-menu.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index 3012a602686..21df142ec04 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -165,6 +165,13 @@
:keys "b c"
:active (>= (calc-stack-size) 1)
:help "Reduce (1:) modulo 2^wordsize"]
+ ["Clip (1:) to [-2^(w-1),2^(w-1))"
+ (progn
+ (require 'calc-bin)
+ (call-interactively 'calc-symclip))
+ :keys "b s"
+ :active (>= (calc-stack-size) 1)
+ :help "Reduce (1:) to [-2^(w-1),2^w)"]
["(2:) and (1:)"
(progn
(require 'calc-bin)
@@ -1133,6 +1140,14 @@
:keys "d 2"
:style radio
:selected (= calc-number-radix 2)]
+ ["Twos complement"
+ (progn
+ (require 'calc-bin)
+ (call-interactively
+ (lambda () (interactive) (calc-binary-radix t))))
+ :keys "C-u d 2"
+ :style radio
+ :selected calc-complement-signed-mode]
["Octal"
(progn
(require 'calc-bin)