Mercurial > emacs
changeset 65901:f4c158053fb0
(calc-matrix-mode, math-get-modes-vec): Add square matrix option.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 07 Oct 2005 21:18:01 +0000 |
parents | 13cc64069e8c |
children | a15a1dd65d9e |
files | lisp/calc/calc-mode.el |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calc/calc-mode.el Fri Oct 07 21:15:52 2005 +0000 +++ b/lisp/calc/calc-mode.el Fri Oct 07 21:18:01 2005 +0000 @@ -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