diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2005-10-07 21:18:01 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2005-10-07 21:18:01 +0000 |
commit | d7b79b09b1dc1bc5e58772bd099f4324d93182c9 (patch) | |
tree | dfb5927aa6796e1de45b4c84a69bb33c26e19224 /lisp/calc | |
parent | 3f2f0fb736191cbd331241641157ce0c8412bd49 (diff) | |
download | emacs-d7b79b09b1dc1bc5e58772bd099f4324d93182c9.tar.gz |
(calc-matrix-mode, math-get-modes-vec): Add square matrix option.
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calc-mode.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 41b346ebd5a..7782b7a1f83 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -352,6 +352,7 @@ (if (eq calc-complex-mode 'polar) 1 0) (cond ((eq calc-matrix-mode 'scalar) 0) ((eq calc-matrix-mode 'matrix) -2) + ((eq calc-matrix-mode 'square) -3) (calc-matrix-mode) (t -1)) (cond ((eq calc-simplify-mode 'none) -1) @@ -476,7 +477,9 @@ (cond ((eq arg 0) 'scalar) ((< (prefix-numeric-value arg) 1) (and (< (prefix-numeric-value arg) -1) 'matrix)) - (arg (prefix-numeric-value arg)) + (arg + (if (consp arg) 'square + (prefix-numeric-value arg))) ((eq calc-matrix-mode 'matrix) 'scalar) ((eq calc-matrix-mode 'scalar) nil) (t 'matrix))) @@ -485,9 +488,11 @@ calc-matrix-mode calc-matrix-mode) (message (if (eq calc-matrix-mode 'matrix) "Variables are assumed to be matrices" - (if calc-matrix-mode - "Variables are assumed to be scalars (non-matrices)" - "Variables are not assumed to be matrix or scalar")))))) + (if (eq calc-matrix-mode 'square) + "Variables are assumed to be square matrices" + (if calc-matrix-mode + "Variables are assumed to be scalars (non-matrices)" + "Variables are not assumed to be matrix or scalar"))))))) (defun calc-set-simplify-mode (mode arg msg) (calc-change-mode 'calc-simplify-mode |