calc/calc.el (calc-simplify-mode): Make 'alg the default value.
(calc-set-mode-line): Don't display "AlgSimp ". calc/calc-mode.el (calc-alg-simplify-mode): Remove function. (calc-lim-simplify-mode): New function. (calc-set-simplify-mode): Default to 'alg. (calc-default-simplify-mode): Make algebraic simplifications the default. calc/calc-ext.el (calc-init-extensions): Remove binding for `calc-alg-simplify-mode'. Add binding for `calc-lim-simplify-mode'. calc/README: Mention new default simplification mode.
This commit is contained in:
parent
d5040d2dec
commit
1823ac5abe
5 changed files with 37 additions and 14 deletions
|
@ -1,5 +1,19 @@
|
|||
2012-07-29 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc/calc.el (calc-simplify-mode): Make 'alg the default value.
|
||||
(calc-set-mode-line): Don't display "AlgSimp ".
|
||||
|
||||
* calc/calc-mode.el (calc-alg-simplify-mode): Remove function.
|
||||
(calc-lim-simplify-mode): New function.
|
||||
(calc-set-simplify-mode): Default to 'alg.
|
||||
(calc-default-simplify-mode): Make algebraic simplifications
|
||||
the default.
|
||||
|
||||
* calc/calc-ext.el (calc-init-extensions): Remove binding for
|
||||
`calc-alg-simplify-mode'. Add binding for `calc-lim-simplify-mode'.
|
||||
|
||||
* calc/README: Mention new default simplification mode.
|
||||
|
||||
* calc/calc.el (math-normalize-error): New variable.
|
||||
(math-normalize): Set `math-normalize-error' to t
|
||||
when there's an error.
|
||||
|
|
|
@ -70,6 +70,12 @@ opinions.
|
|||
Summary of changes to "Calc"
|
||||
------- -- ------- -- ----
|
||||
|
||||
Emacs 24.2
|
||||
|
||||
Algebraic simplification mode is now the default.
|
||||
To restrict to the limited simplifications given by the former
|
||||
default simplification mode, use `m L'.
|
||||
|
||||
Emacs 24.1
|
||||
|
||||
* Support for musical notes added.
|
||||
|
|
|
@ -454,12 +454,12 @@
|
|||
(define-key calc-mode-map "mv" 'calc-matrix-mode)
|
||||
(define-key calc-mode-map "mw" 'calc-working)
|
||||
(define-key calc-mode-map "mx" 'calc-always-load-extensions)
|
||||
(define-key calc-mode-map "mA" 'calc-alg-simplify-mode)
|
||||
(define-key calc-mode-map "mB" 'calc-bin-simplify-mode)
|
||||
(define-key calc-mode-map "mC" 'calc-auto-recompute)
|
||||
(define-key calc-mode-map "mD" 'calc-default-simplify-mode)
|
||||
(define-key calc-mode-map "mE" 'calc-ext-simplify-mode)
|
||||
(define-key calc-mode-map "mF" 'calc-settings-file-name)
|
||||
(define-key calc-mode-map "mL" 'calc-lim-simplify-mode)
|
||||
(define-key calc-mode-map "mM" 'calc-more-recursion-depth)
|
||||
(define-key calc-mode-map "mN" 'calc-num-simplify-mode)
|
||||
(define-key calc-mode-map "mO" 'calc-no-simplify-mode)
|
||||
|
@ -1093,7 +1093,7 @@ calc-pi calc-radians-mode calc-sec calc-sech
|
|||
calc-sin calc-sincos calc-sinh calc-sqrt
|
||||
calc-tan calc-tanh calc-to-degrees calc-to-radians)
|
||||
|
||||
("calc-mode" calc-alg-simplify-mode calc-algebraic-mode
|
||||
("calc-mode" calc-lim-simplify-mode calc-algebraic-mode
|
||||
calc-always-load-extensions calc-auto-recompute calc-auto-why
|
||||
calc-bin-simplify-mode calc-break-vectors calc-center-justify
|
||||
calc-default-simplify-mode calc-display-raw calc-eng-notation
|
||||
|
|
|
@ -504,7 +504,7 @@
|
|||
mode)))
|
||||
(message "%s" (if (eq calc-simplify-mode mode)
|
||||
msg
|
||||
"Default simplifications enabled")))
|
||||
"Default algebraic simplifications enabled")))
|
||||
|
||||
(defun calc-no-simplify-mode (arg)
|
||||
(interactive "P")
|
||||
|
@ -519,15 +519,18 @@
|
|||
"Default simplifications apply only if arguments are numeric")))
|
||||
|
||||
(defun calc-default-simplify-mode (arg)
|
||||
(interactive "p")
|
||||
(cond ((= arg 1)
|
||||
(interactive "P")
|
||||
(cond ((or (not arg) (= arg 3))
|
||||
(calc-wrapper
|
||||
(calc-set-simplify-mode
|
||||
'alg nil "Default algebraic simplifications enabled")))
|
||||
((= arg 1)
|
||||
(calc-wrapper
|
||||
(calc-set-simplify-mode
|
||||
nil nil "Usual default simplifications are enabled")))
|
||||
nil nil "Limited simplifications occur by default")))
|
||||
((= arg 0) (calc-num-simplify-mode 1))
|
||||
((< arg 0) (calc-no-simplify-mode 1))
|
||||
((= arg 2) (calc-bin-simplify-mode 1))
|
||||
((= arg 3) (calc-alg-simplify-mode 1))
|
||||
((= arg 4) (calc-ext-simplify-mode 1))
|
||||
((= arg 5) (calc-units-simplify-mode 1))
|
||||
(t (error "Prefix argument out of range"))))
|
||||
|
@ -539,11 +542,11 @@
|
|||
(format "Binary simplification occurs by default (word size=%d)"
|
||||
calc-word-size))))
|
||||
|
||||
(defun calc-alg-simplify-mode (arg)
|
||||
(defun calc-lim-simplify-mode (arg)
|
||||
(interactive "P")
|
||||
(calc-wrapper
|
||||
(calc-set-simplify-mode 'alg arg
|
||||
"Algebraic simplification occurs by default")))
|
||||
(calc-set-simplify-mode nil arg
|
||||
"Limited simplifications occur by default")))
|
||||
|
||||
(defun calc-ext-simplify-mode (arg)
|
||||
(interactive "P")
|
||||
|
|
|
@ -698,11 +698,11 @@ If `C' is present, display outer brackets for matrices (centered).")
|
|||
(defcalcmodevar calc-previous-modulo nil
|
||||
"Most recently used value of M in a modulo form.")
|
||||
|
||||
(defcalcmodevar calc-simplify-mode nil
|
||||
(defcalcmodevar calc-simplify-mode 'alg
|
||||
"Type of simplification applied to results.
|
||||
If `none', results are not simplified when pushed on the stack.
|
||||
If `num', functions are simplified only when args are constant.
|
||||
If nil, only fast simplifications are applied.
|
||||
If nil, only limited simplifications are applied.
|
||||
If `binary', `math-clip' is applied if appropriate.
|
||||
If `alg', `math-simplify' is applied.
|
||||
If `ext', `math-simplify-extended' is applied.
|
||||
|
@ -1757,10 +1757,10 @@ See calc-keypad for details."
|
|||
((eq calc-simplify-mode 'num) "NumSimp ")
|
||||
((eq calc-simplify-mode 'binary)
|
||||
(format "BinSimp%d " calc-word-size))
|
||||
((eq calc-simplify-mode 'alg) "AlgSimp ")
|
||||
((eq calc-simplify-mode 'alg) "")
|
||||
((eq calc-simplify-mode 'ext) "ExtSimp ")
|
||||
((eq calc-simplify-mode 'units) "UnitSimp ")
|
||||
(t ""))
|
||||
(t "LimSimp "))
|
||||
|
||||
;; Display modes
|
||||
(cond ((= calc-number-radix 10) "")
|
||||
|
|
Loading…
Add table
Reference in a new issue