Variable: calculator-initial-operators

calculator-initial-operators is a variable defined in calculator.el.gz.

Value

Large value
(("=" = identity 1 -1)
 (nobind "+" + + 2 4)
 (nobind "-" - - 2 4)
 (nobind "+" + + -1 9)
 (nobind "-" - - -1 9)
 ("(" \( identity -1 -1)
 (")" \) identity 1 10)
 ("|" or
  (logior TX TY)
  2 2)
 ("#" xor
  (logxor TX TY)
  2 2)
 ("&" and
  (logand TX TY)
  2 3)
 ("*" * * 2 5)
 ("/" / / 2 5)
 ("\\" div
  (/ TX TY)
  2 5)
 ("%" rem
  (% TX TY)
  2 5)
 ("L" log log 2 6)
 ("S" sin
  (sin DX)
  x 6)
 ("C" cos
  (cos DX)
  x 6)
 ("T" tan
  (tan DX)
  x 6)
 ("IS" asin
  (D
   (asin X))
  x 6)
 ("IC" acos
  (D
   (acos X))
  x 6)
 ("IT" atan
  (D
   (atan X))
  x 6)
 ("Q" sqrt sqrt x 7)
 ("^" ^ calculator-expt 2 7)
 ("!" ! calculator-fact x 7)
 (";" 1/
  (/ 1 X)
  1 7)
 ("_" - - 1 8)
 ("~" ~
  (lognot TX)
  x 8)
 (">" repR calculator-repR 1 8)
 ("<" repL calculator-repL 1 8)
 ("v" avg
  (/
   (apply '+ L)
   (length L))
  0 8)
 ("l" tot
  (apply '+ L)
  0 8))

Documentation

A list of initial operators.

This is a list in the same format as calculator-operators. Whenever calculator starts, it looks at the value of this variable, and if it is not empty, its contents is prepended to calculator-operators and the appropriate key bindings are made.

This variable is then reset to nil. Don't use this if you want to add user-defined operators, use calculator-user-operators instead.

Source Code

;; Defined in /usr/src/emacs/lisp/calculator.el.gz
;;;---------------------------------------------------------------------
;;; Variables

(defvar calculator-initial-operators
  '(;; "+"/"-" have keybindings of their own, not calculator-ops
    ("=" =     identity        1 -1)
    (nobind "+" +  +           2  4)
    (nobind "-" -  -           2  4)
    (nobind "+" +  +          -1  9)
    (nobind "-" -  -          -1  9)
    ("(" \(    identity       -1 -1)
    (")" \)    identity       +1 10)
    ;; normal keys
    ("|"  or   (logior TX TY)  2  2)
    ("#"  xor  (logxor TX TY)  2  2)
    ("&"  and  (logand TX TY)  2  3)
    ("*"  *    *               2  5)
    ("/"  /    /               2  5)
    ("\\" div  (/ TX TY)       2  5)
    ("%"  rem  (% TX TY)       2  5)
    ("L"  log  log             2  6)
    ("S"  sin  (sin DX)        x  6)
    ("C"  cos  (cos DX)        x  6)
    ("T"  tan  (tan DX)        x  6)
    ("IS" asin (D (asin X))    x  6)
    ("IC" acos (D (acos X))    x  6)
    ("IT" atan (D (atan X))    x  6)
    ("Q"  sqrt sqrt            x  7)
    ("^"  ^    calculator-expt 2  7)
    ("!"  !    calculator-fact x  7)
    (";"  1/   (/ 1 X)         1  7)
    ("_"  -    -               1  8)
    ("~"  ~    (lognot TX)     x  8)
    (">"  repR calculator-repR 1  8)
    ("<"  repL calculator-repL 1  8)
    ("v"  avg  (/ (apply '+ L) (length L)) 0 8)
    ("l"  tot  (apply '+ L)    0 8)
    )
  "A list of initial operators.
This is a list in the same format as `calculator-operators'.  Whenever
`calculator' starts, it looks at the value of this variable, and if it
is not empty, its contents is prepended to `calculator-operators' and
the appropriate key bindings are made.

This variable is then reset to nil.  Don't use this if you want to add
user-defined operators, use `calculator-user-operators' instead.")