emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99928: calc-bin.el (calc-radix): Hav


From: Jay Belanger
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99928: calc-bin.el (calc-radix): Have the O option turn on twos-complement mode.
Date: Sat, 17 Apr 2010 23:13:09 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99928
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Sat 2010-04-17 23:13:09 -0500
message:
  calc-bin.el (calc-radix): Have the O option turn on twos-complement mode.
modified:
  doc/misc/ChangeLog
  doc/misc/calc.texi
  lisp/ChangeLog
  lisp/calc/README
  lisp/calc/calc-bin.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2010-04-15 10:11:52 +0000
+++ b/doc/misc/ChangeLog        2010-04-18 04:13:09 +0000
@@ -1,3 +1,9 @@
+2010-04-18  Jay Belanger  <address@hidden>
+
+       * calc.texi (Radix modes): Mention that the option prefix will
+       turn on twos-complement mode.
+       (Inverse and Hyperbolic Flags): Mention the Option flag.
+
 2010-04-15  Carsten Dominik  <address@hidden>
 
        * org.texi (LaTeX and PDF export): Add a footnote about xetex.

=== modified file 'doc/misc/calc.texi'
--- a/doc/misc/calc.texi        2010-03-31 03:47:52 +0000
+++ b/doc/misc/calc.texi        2010-04-18 04:13:09 +0000
@@ -12289,15 +12289,21 @@
 toggle the Inverse and/or Hyperbolic flags and then execute the
 corresponding base command (@code{calc-sin} in this case).
 
-The Inverse and Hyperbolic flags apply only to the next Calculator
-command, after which they are automatically cleared.  (They are also
-cleared if the next keystroke is not a Calc command.)  Digits you
-type after @kbd{I} or @kbd{H} (or @kbd{K}) are treated as prefix
-arguments for the next command, not as numeric entries.  The same
-is true of @kbd{C-u}, but not of the minus sign (@kbd{K -} means to
-subtract and keep arguments).
-
-The third Calc prefix flag, @kbd{K} (keep-arguments), is discussed
address@hidden O
address@hidden calc-option
+The @kbd{O} key (@code{calc-option}) sets another flag, the
address@hidden Flag}, which also can alter the subsequent Calc command in
+various ways. 
+
+The Inverse, Hyperbolic and Option flags apply only to the next
+Calculator command, after which they are automatically cleared.  (They
+are also cleared if the next keystroke is not a Calc command.)  Digits
+you type after @kbd{I}, @kbd{H} or @kbd{O} (or @kbd{K}) are treated as
+prefix arguments for the next command, not as numeric entries.  The
+same is true of @kbd{C-u}, but not of the minus sign (@kbd{K -} means
+to subtract and keep arguments).
+
+Another Calc prefix flag, @kbd{K} (keep-arguments), is discussed
 elsewhere.  @xref{Keep Arguments}.
 
 @node Calculation Modes, Simplification Modes, Inverse and Hyperbolic, Mode 
Settings
@@ -13175,12 +13181,13 @@
 entirety.) 
 
 @cindex Two's complements
-With the binary, octal and hexadecimal display modes, Calc can
-display @expr{w}-bit integers using two's complement notation.  This
-option is selected with the key sequences @kbd{C-u d 2}, @kbd{C-u d 8}
-and @kbd{C-u d 6}, respectively, and a negative word size might be
-appropriate (@pxref{Binary Functions}). In two's complement 
-notation, the integers in the (nearly) symmetric interval from
+Calc can display @expr{w}-bit integers using two's complement
+notation, although this is most useful with the binary, octal and
+hexadecimal display modes.  This option is selected by using the
address@hidden option prefix before setting the display radix, and a negative 
word
+size might be appropriate (@pxref{Binary Functions}). In two's
+complement notation, the integers in the (nearly) symmetric interval
+from
 @texline @math{-2^{w-1}}
 @infoline @expr{-2^(w-1)}
 to
@@ -35461,6 +35468,7 @@
 @r{       @:      M     @:             @:        @:calc-more-recursion-depth@:}
 @r{       @:    I M     @:             @:        @:calc-less-recursion-depth@:}
 @r{      a@:      N     @:             @:     5  @:evalvn@:(a)}
address@hidden       @:      O     @:command      @:    32  @:@:Option}
 @r{       @:      P     @:             @:        @:@:pi}
 @r{       @:    I P     @:             @:        @:@:gamma}
 @r{       @:    H P     @:             @:        @:@:e}

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-04-17 02:47:25 +0000
+++ b/lisp/ChangeLog    2010-04-18 04:13:09 +0000
@@ -1,3 +1,10 @@
+2010-04-18  Jay Belanger  <address@hidden>
+
+       * calc.el (calc-mode-map): Bind "O" to `calc-missing-key'.
+
+       * calc-bin.el (calc-radix): Have the "O" option turn on
+       twos-complement mode.
+
 2010-04-17  Jay Belanger  <address@hidden>
 
        * calc-ext.el (calc-init-extensions): Add keybinding for 'calc-option'.

=== modified file 'lisp/calc/README'
--- a/lisp/calc/README  2010-01-13 08:35:10 +0000
+++ b/lisp/calc/README  2010-04-18 04:13:09 +0000
@@ -72,6 +72,12 @@
 Summary of changes to "Calc"
 ------- -- ------- --  ----
 
+Emacs 24.1
+
+* Added "O" option prefix.
+
+* Used "O" prefix to "d r" (`calc-radix') to turn on twos-complement mode.
+
 Emacs 23.2
 
 * Added twos-complement display.

=== modified file 'lisp/calc/calc-bin.el'
--- a/lisp/calc/calc-bin.el     2010-01-13 08:35:10 +0000
+++ b/lisp/calc/calc-bin.el     2010-04-18 04:13:09 +0000
@@ -175,7 +175,7 @@
        (progn
         (calc-change-mode 
           (list 'calc-number-radix 'calc-twos-complement-mode)
-          (list n (and (or (= n 2) (= n 8) (= n 16)) arg)) t)
+          (list n (or arg (calc-is-option))) t)
         ;; also change global value so minibuffer sees it
         (setq-default calc-number-radix calc-number-radix))
      (setq n calc-number-radix))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]