summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2012-07-29 18:19:09 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2012-07-29 18:19:09 -0500
commit1823ac5abe03117aab926ff0d51a189d513251ce (patch)
treed112892af598e398534a8e4b7585982f86a25299 /lisp/calc
parentd5040d2dec0f7e08b715ce6952d5568ed86d1812 (diff)
downloademacs-1823ac5abe03117aab926ff0d51a189d513251ce.tar.gz
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.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/README6
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc-mode.el19
-rw-r--r--lisp/calc/calc.el8
4 files changed, 23 insertions, 14 deletions
diff --git a/lisp/calc/README b/lisp/calc/README
index e4b681d5625..b09ac6f79eb 100644
--- a/lisp/calc/README
+++ b/lisp/calc/README
@@ -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.
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 818b19757be..883cc3dd939 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -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
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 3f583192bcf..28cb58656c0 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -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")
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index a149cfe7966..dd1efd014fb 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -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) "")