diff options
| author | Jay Belanger | 2005-10-07 21:18:01 +0000 |
|---|---|---|
| committer | Jay Belanger | 2005-10-07 21:18:01 +0000 |
| commit | d7b79b09b1dc1bc5e58772bd099f4324d93182c9 (patch) | |
| tree | dfb5927aa6796e1de45b4c84a69bb33c26e19224 | |
| parent | 3f2f0fb736191cbd331241641157ce0c8412bd49 (diff) | |
| download | emacs-d7b79b09b1dc1bc5e58772bd099f4324d93182c9.tar.gz emacs-d7b79b09b1dc1bc5e58772bd099f4324d93182c9.zip | |
(calc-matrix-mode, math-get-modes-vec): Add square matrix option.
| -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 @@ | |||
| 352 | (if (eq calc-complex-mode 'polar) 1 0) | 352 | (if (eq calc-complex-mode 'polar) 1 0) |
| 353 | (cond ((eq calc-matrix-mode 'scalar) 0) | 353 | (cond ((eq calc-matrix-mode 'scalar) 0) |
| 354 | ((eq calc-matrix-mode 'matrix) -2) | 354 | ((eq calc-matrix-mode 'matrix) -2) |
| 355 | ((eq calc-matrix-mode 'square) -3) | ||
| 355 | (calc-matrix-mode) | 356 | (calc-matrix-mode) |
| 356 | (t -1)) | 357 | (t -1)) |
| 357 | (cond ((eq calc-simplify-mode 'none) -1) | 358 | (cond ((eq calc-simplify-mode 'none) -1) |
| @@ -476,7 +477,9 @@ | |||
| 476 | (cond ((eq arg 0) 'scalar) | 477 | (cond ((eq arg 0) 'scalar) |
| 477 | ((< (prefix-numeric-value arg) 1) | 478 | ((< (prefix-numeric-value arg) 1) |
| 478 | (and (< (prefix-numeric-value arg) -1) 'matrix)) | 479 | (and (< (prefix-numeric-value arg) -1) 'matrix)) |
| 479 | (arg (prefix-numeric-value arg)) | 480 | (arg |
| 481 | (if (consp arg) 'square | ||
| 482 | (prefix-numeric-value arg))) | ||
| 480 | ((eq calc-matrix-mode 'matrix) 'scalar) | 483 | ((eq calc-matrix-mode 'matrix) 'scalar) |
| 481 | ((eq calc-matrix-mode 'scalar) nil) | 484 | ((eq calc-matrix-mode 'scalar) nil) |
| 482 | (t 'matrix))) | 485 | (t 'matrix))) |
| @@ -485,9 +488,11 @@ | |||
| 485 | calc-matrix-mode calc-matrix-mode) | 488 | calc-matrix-mode calc-matrix-mode) |
| 486 | (message (if (eq calc-matrix-mode 'matrix) | 489 | (message (if (eq calc-matrix-mode 'matrix) |
| 487 | "Variables are assumed to be matrices" | 490 | "Variables are assumed to be matrices" |
| 488 | (if calc-matrix-mode | 491 | (if (eq calc-matrix-mode 'square) |
| 489 | "Variables are assumed to be scalars (non-matrices)" | 492 | "Variables are assumed to be square matrices" |
| 490 | "Variables are not assumed to be matrix or scalar")))))) | 493 | (if calc-matrix-mode |
| 494 | "Variables are assumed to be scalars (non-matrices)" | ||
| 495 | "Variables are not assumed to be matrix or scalar"))))))) | ||
| 491 | 496 | ||
| 492 | (defun calc-set-simplify-mode (mode arg msg) | 497 | (defun calc-set-simplify-mode (mode arg msg) |
| 493 | (calc-change-mode 'calc-simplify-mode | 498 | (calc-change-mode 'calc-simplify-mode |