Mercurial > emacs
annotate lisp/calc/calc-mode.el @ 44133:098a9d37bf11
*** empty log message ***
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 24 Mar 2002 19:53:11 +0000 |
parents | ca690490ae62 |
children | 6e1c8f17ab33 |
rev | line source |
---|---|
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
1 ;;; calc-mode.el --- calculator modes for Calc |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
2 |
40997
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
4 |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
5 ;; Author: David Gillespie <daveg@synaptics.com> |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
6 ;; Maintainer: Colin Walters <walters@debian.org> |
40785 | 7 |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is distributed in the hope that it will be useful, | |
11 ;; but WITHOUT ANY WARRANTY. No author or distributor | |
12 ;; accepts responsibility to anyone for the consequences of using it | |
13 ;; or for whether it serves any particular purpose or works at all, | |
14 ;; unless he says so in writing. Refer to the GNU Emacs General Public | |
15 ;; License for full details. | |
16 | |
17 ;; Everyone is granted permission to copy, modify and redistribute | |
18 ;; GNU Emacs, but only under the conditions described in the | |
19 ;; GNU Emacs General Public License. A copy of this license is | |
20 ;; supposed to have been given to you along with GNU Emacs so you | |
21 ;; can know your rights and responsibilities. It should be in a | |
22 ;; file named COPYING. Among other things, the copyright notice | |
23 ;; and this notice must be preserved on all copies. | |
24 | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
25 ;;; Commentary: |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
26 |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
27 ;;; Code: |
40785 | 28 |
29 | |
30 ;; This file is autoloaded from calc-ext.el. | |
31 (require 'calc-ext) | |
32 | |
33 (require 'calc-macs) | |
34 | |
35 (defun calc-Need-calc-mode () nil) | |
36 | |
37 | |
38 (defun calc-line-numbering (n) | |
39 (interactive "P") | |
40 (calc-wrapper | |
41 (message (if (calc-change-mode 'calc-line-numbering n t t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
42 "Displaying stack level numbers" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
43 "Hiding stack level numbers")))) |
40785 | 44 |
45 (defun calc-line-breaking (n) | |
46 (interactive "P") | |
47 (calc-wrapper | |
48 (setq n (if n | |
49 (and (> (setq n (prefix-numeric-value n)) 0) | |
50 (or (< n 5) | |
51 n)) | |
52 (not calc-line-breaking))) | |
53 (if (calc-change-mode 'calc-line-breaking n t) | |
54 (if (integerp calc-line-breaking) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
55 (message "Breaking lines longer than %d characters" n) |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
56 (message "Breaking long lines in Stack display")) |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
57 (message "Not breaking long lines in Stack display")))) |
40785 | 58 |
59 | |
60 (defun calc-left-justify (n) | |
61 (interactive "P") | |
62 (calc-wrapper | |
63 (and n (setq n (prefix-numeric-value n))) | |
64 (calc-change-mode '(calc-display-just calc-display-origin) | |
65 (list nil n) t) | |
66 (if n | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
67 (message "Displaying stack entries indented by %d" n) |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
68 (message "Displaying stack entries left-justified")))) |
40785 | 69 |
70 (defun calc-center-justify (n) | |
71 (interactive "P") | |
72 (calc-wrapper | |
73 (and n (setq n (prefix-numeric-value n))) | |
74 (calc-change-mode '(calc-display-just calc-display-origin) | |
75 (list 'center n) t) | |
76 (if n | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
77 (message "Displaying stack entries centered on column %d" n) |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
78 (message "Displaying stack entries centered in window")))) |
40785 | 79 |
80 (defun calc-right-justify (n) | |
81 (interactive "P") | |
82 (calc-wrapper | |
83 (and n (setq n (prefix-numeric-value n))) | |
84 (calc-change-mode '(calc-display-just calc-display-origin) | |
85 (list 'right n) t) | |
86 (if n | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
87 (message "Displaying stack entries right-justified to column %d" n) |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
88 (message "Displaying stack entries right-justified in window")))) |
40785 | 89 |
90 (defun calc-left-label (s) | |
91 (interactive "sLefthand label: ") | |
92 (calc-wrapper | |
93 (or (equal s "") | |
94 (setq s (concat s " "))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
95 (calc-change-mode 'calc-left-label s t))) |
40785 | 96 |
97 (defun calc-right-label (s) | |
98 (interactive "sRighthand label: ") | |
99 (calc-wrapper | |
100 (or (equal s "") | |
101 (setq s (concat " " s))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
102 (calc-change-mode 'calc-right-label s t))) |
40785 | 103 |
104 (defun calc-auto-why (n) | |
105 (interactive "P") | |
106 (calc-wrapper | |
107 (if n | |
108 (progn | |
109 (setq n (prefix-numeric-value n)) | |
110 (if (<= n 0) (setq n nil) | |
111 (if (> n 1) (setq n t)))) | |
112 (setq n (and (not (eq calc-auto-why t)) (if calc-auto-why t 1)))) | |
113 (calc-change-mode 'calc-auto-why n nil) | |
114 (cond ((null n) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
115 (message "User must press `w' to explain unsimplified results")) |
40785 | 116 ((eq n t) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
117 (message "Automatically doing `w' to explain unsimplified results")) |
40785 | 118 (t |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
119 (message "Automatically doing `w' only for unusual messages"))))) |
40785 | 120 |
121 (defun calc-group-digits (n) | |
122 (interactive "P") | |
123 (calc-wrapper | |
124 (if n | |
125 (progn | |
126 (setq n (prefix-numeric-value n)) | |
127 (cond ((or (> n 0) (< n -1))) | |
128 ((= n -1) | |
129 (setq n nil)) | |
130 (t | |
131 (setq n calc-group-digits)))) | |
132 (setq n (not calc-group-digits))) | |
133 (calc-change-mode 'calc-group-digits n t) | |
134 (cond ((null n) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
135 (message "Grouping is off")) |
40785 | 136 ((integerp n) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
137 (message "Grouping every %d digits" (math-abs n))) |
40785 | 138 (t |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
139 (message "Grouping is on"))))) |
40785 | 140 |
141 (defun calc-group-char (ch) | |
142 (interactive "cGrouping character: ") | |
143 (calc-wrapper | |
144 (or (>= ch 32) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
145 (error "Control characters not allowed for grouping")) |
40785 | 146 (if (= ch ?\\) |
147 (setq ch "\\,") | |
148 (setq ch (char-to-string ch))) | |
149 (calc-change-mode 'calc-group-char ch calc-group-digits) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
150 (message "Digit grouping character is \"%s\"" ch))) |
40785 | 151 |
152 (defun calc-point-char (ch) | |
153 (interactive "cCharacter to use as decimal point: ") | |
154 (calc-wrapper | |
155 (or (>= ch 32) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
156 (error "Control characters not allowed as decimal point")) |
40785 | 157 (calc-change-mode 'calc-point-char (char-to-string ch) t) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
158 (message "Decimal point character is \"%c\"" ch))) |
40785 | 159 |
160 (defun calc-normal-notation (n) | |
161 (interactive "P") | |
162 (calc-wrapper | |
163 (calc-change-mode 'calc-float-format | |
164 (let* ((val (if n (prefix-numeric-value n) 0)) | |
165 (mode (/ (+ val 5000) 10000))) | |
166 (if (or (< val -5000) (> mode 3)) | |
167 (error "Prefix out of range")) | |
168 (setq n (list (aref [float sci eng fix] mode) | |
169 (- (% (+ val 5000) 10000) 5000)))) | |
170 t) | |
171 (if (eq (nth 1 n) 0) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
172 (message "Displaying floating-point numbers normally") |
40785 | 173 (if (> (nth 1 n) 0) |
174 (message | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
175 "Displaying floating-point numbers with %d significant digits" |
40785 | 176 (nth 1 n)) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
177 (message "Displaying floating-point numbers with (precision%d)" |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
178 (nth 1 n)))))) |
40785 | 179 |
180 (defun calc-fix-notation (n) | |
181 (interactive "NDigits after decimal point: ") | |
182 (calc-wrapper | |
183 (calc-change-mode 'calc-float-format | |
184 (setq n (list 'fix (if n (prefix-numeric-value n) 0))) | |
185 t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
186 (message "Displaying floats with %d digits after decimal" |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
187 (math-abs (nth 1 n))))) |
40785 | 188 |
189 (defun calc-sci-notation (n) | |
190 (interactive "P") | |
191 (calc-wrapper | |
192 (calc-change-mode 'calc-float-format | |
193 (setq n (list 'sci (if n (prefix-numeric-value n) 0))) | |
194 t) | |
195 (if (eq (nth 1 n) 0) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
196 (message "Displaying floats in scientific notation") |
40785 | 197 (if (> (nth 1 n) 0) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
198 (message "Displaying scientific notation with %d significant digits" |
40785 | 199 (nth 1 n)) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
200 (message "Displaying scientific notation with (precision%d)" |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
201 (nth 1 n)))))) |
40785 | 202 |
203 (defun calc-eng-notation (n) | |
204 (interactive "P") | |
205 (calc-wrapper | |
206 (calc-change-mode 'calc-float-format | |
207 (setq n (list 'eng (if n (prefix-numeric-value n) 0))) | |
208 t) | |
209 (if (eq (nth 1 n) 0) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
210 (message "Displaying floats in engineering notation") |
40785 | 211 (if (> (nth 1 n) 0) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
212 (message "Displaying engineering notation with %d significant digits" |
40785 | 213 (nth 1 n)) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
214 (message "Displaying engineering notation with (precision%d)" |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
215 (nth 1 n)))))) |
40785 | 216 |
217 | |
218 (defun calc-truncate-stack (n &optional rel) | |
219 (interactive "P") | |
220 (calc-wrapper | |
221 (let ((oldtop calc-stack-top) | |
222 (newtop calc-stack-top)) | |
223 (calc-record-undo (list 'set 'saved-stack-top calc-stack-top)) | |
224 (let ((calc-stack-top 0) | |
225 (nn (prefix-numeric-value n))) | |
226 (setq newtop | |
227 (if n | |
228 (progn | |
229 (if rel | |
230 (setq nn (+ oldtop nn)) | |
231 (if (< nn 0) | |
232 (setq nn (+ nn (calc-stack-size))) | |
233 (setq nn (1+ nn)))) | |
234 (if (< nn 1) | |
235 1 | |
236 (if (> nn (calc-stack-size)) | |
237 (calc-stack-size) | |
238 nn))) | |
239 (max 1 (calc-locate-cursor-element (point))))) | |
240 (if (= newtop oldtop) | |
241 () | |
242 (calc-pop-stack 1 oldtop t) | |
243 (calc-push-list '(top-of-stack) newtop) | |
244 (if calc-line-numbering | |
245 (calc-refresh)))) | |
246 (calc-record-undo (list 'set 'saved-stack-top 0)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
247 (setq calc-stack-top newtop)))) |
40785 | 248 |
249 (defun calc-truncate-up (n) | |
250 (interactive "p") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
251 (calc-truncate-stack n t)) |
40785 | 252 |
253 (defun calc-truncate-down (n) | |
254 (interactive "p") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
255 (calc-truncate-stack (- n) t)) |
40785 | 256 |
257 (defun calc-display-raw (arg) | |
258 (interactive "P") | |
259 (calc-wrapper | |
260 (setq calc-display-raw (if calc-display-raw nil (if arg 0 t))) | |
261 (calc-do-refresh) | |
262 (if calc-display-raw | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
263 (message "Press d ' again to cancel \"raw\" display mode")))) |
40785 | 264 |
265 | |
266 | |
267 | |
268 ;;; Mode commands. | |
269 | |
270 (defun calc-save-modes (&optional quiet) | |
271 (interactive) | |
272 (calc-wrapper | |
273 (let (pos | |
274 (vals (mapcar (function (lambda (v) (symbol-value (car v)))) | |
275 calc-mode-var-list))) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
276 (unless calc-settings-file |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
277 (error "No `calc-settings-file' specified")) |
40785 | 278 (set-buffer (find-file-noselect (substitute-in-file-name |
279 calc-settings-file))) | |
280 (goto-char (point-min)) | |
281 (if (and (search-forward ";;; Mode settings stored by Calc" nil t) | |
282 (progn | |
283 (beginning-of-line) | |
284 (setq pos (point)) | |
285 (search-forward "\n;;; End of mode settings" nil t))) | |
286 (progn | |
287 (beginning-of-line) | |
288 (forward-line 1) | |
289 (delete-region pos (point))) | |
290 (goto-char (point-max)) | |
291 (insert "\n\n") | |
292 (forward-char -1)) | |
293 (insert ";;; Mode settings stored by Calc on " (current-time-string) "\n") | |
294 (let ((list calc-mode-var-list)) | |
295 (while list | |
296 (let* ((v (car (car list))) | |
297 (def (nth 1 (car list))) | |
298 (val (car vals))) | |
299 (or (equal val def) | |
300 (progn | |
301 (insert "(setq " (symbol-name v) " ") | |
302 (if (and (or (listp val) | |
303 (symbolp val)) | |
304 (not (memq val '(nil t)))) | |
305 (insert "'")) | |
306 (insert (prin1-to-string val) ")\n")))) | |
307 (setq list (cdr list) | |
308 vals (cdr vals)))) | |
309 (run-hooks 'calc-mode-save-hook) | |
310 (insert ";;; End of mode settings\n") | |
311 (if quiet | |
40997
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
312 ;; FIXME: why is this here? -cgw 2001.11.12 |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
313 (let ((executing-kbd-macro "")) ; what a kludge! |
40785 | 314 (save-buffer)) |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
315 (save-buffer))))) |
40785 | 316 |
317 (defun calc-settings-file-name (name &optional arg) | |
40997
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
318 (interactive |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
319 (list (read-file-name (format "Settings file name (normally %s): " |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
320 (abbreviate-file-name (or user-init-file |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
321 "~/.emacs")))) |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
322 current-prefix-arg)) |
40785 | 323 (calc-wrapper |
324 (setq arg (if arg (prefix-numeric-value arg) 0)) | |
325 (if (equal name "") | |
326 (message "Calc settings file is \"%s\"" calc-settings-file) | |
327 (if (< (math-abs arg) 2) | |
328 (let ((list calc-mode-var-list)) | |
329 (while list | |
330 (set (car (car list)) (nth 1 (car list))) | |
331 (setq list (cdr list))))) | |
40997
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
332 ;; FIXME: we should use ~/.calc or so in order to avoid |
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
333 ;; reexecuting ~/.emacs (it's not always idempotent) -cgw 2001.11.12 |
40785 | 334 (setq calc-settings-file name) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
335 (or (and |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
336 calc-settings-file |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
337 (string-match "\\.emacs" calc-settings-file) |
40785 | 338 (> arg 0)) |
339 (< arg 0) | |
340 (load name t) | |
40997
70241447c9ef
(calc-settings-file-name): Don't hardcode
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
341 (message "New file"))))) |
40785 | 342 |
343 (defun math-get-modes-vec () | |
344 (list 'vec | |
345 calc-internal-prec | |
346 calc-word-size | |
347 (calc-stack-size) | |
348 calc-number-radix | |
349 (+ (if (<= (nth 1 calc-float-format) 0) | |
350 (+ calc-internal-prec (nth 1 calc-float-format)) | |
351 (nth 1 calc-float-format)) | |
352 (cdr (assq (car calc-float-format) | |
353 '((float . 0) (sci . 10000) | |
354 (eng . 20000) (fix . 30000))))) | |
355 (cond ((eq calc-angle-mode 'rad) 2) | |
356 ((eq calc-angle-mode 'hms) 3) | |
357 (t 1)) | |
358 (if calc-symbolic-mode 1 0) | |
359 (if calc-prefer-frac 1 0) | |
360 (if (eq calc-complex-mode 'polar) 1 0) | |
361 (cond ((eq calc-matrix-mode 'scalar) 0) | |
362 ((eq calc-matrix-mode 'matrix) -2) | |
363 (calc-matrix-mode) | |
364 (t -1)) | |
365 (cond ((eq calc-simplify-mode 'none) -1) | |
366 ((eq calc-simplify-mode 'num) 0) | |
367 ((eq calc-simplify-mode 'binary) 2) | |
368 ((eq calc-simplify-mode 'alg) 3) | |
369 ((eq calc-simplify-mode 'ext) 4) | |
370 ((eq calc-simplify-mode 'units) 5) | |
371 (t 1)) | |
372 (cond ((eq calc-infinite-mode 1) 0) | |
373 (calc-infinite-mode 1) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
374 (t -1)))) |
40785 | 375 |
376 (defun calc-get-modes (n) | |
377 (interactive "P") | |
378 (calc-wrapper | |
379 (let ((modes (math-get-modes-vec))) | |
380 (calc-enter-result 0 "mode" | |
381 (if n | |
382 (if (and (>= (setq n (prefix-numeric-value n)) 1) | |
383 (< n (length modes))) | |
384 (nth n modes) | |
385 (error "Prefix out of range")) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
386 modes))))) |
40785 | 387 |
388 (defun calc-shift-prefix (arg) | |
389 (interactive "P") | |
390 (calc-wrapper | |
391 (setq calc-shift-prefix (if arg | |
392 (> (prefix-numeric-value arg) 0) | |
393 (not calc-shift-prefix))) | |
394 (calc-init-prefixes) | |
395 (message (if calc-shift-prefix | |
396 "Prefix keys are now case-insensitive" | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
397 "Prefix keys must be unshifted (except V, Z)")))) |
40785 | 398 |
399 (defun calc-mode-record-mode (n) | |
400 (interactive "P") | |
401 (calc-wrapper | |
402 (calc-change-mode 'calc-mode-save-mode | |
403 (cond ((null n) | |
404 (cond ((not calc-embedded-info) | |
405 (if (eq calc-mode-save-mode 'save) | |
406 'local 'save)) | |
407 ((eq calc-mode-save-mode 'local) 'edit) | |
408 ((eq calc-mode-save-mode 'edit) 'perm) | |
409 ((eq calc-mode-save-mode 'perm) 'global) | |
410 ((eq calc-mode-save-mode 'global) 'save) | |
411 ((eq calc-mode-save-mode 'save) nil) | |
412 ((eq calc-mode-save-mode nil) 'local))) | |
413 ((= (setq n (prefix-numeric-value n)) 0) nil) | |
414 ((= n 2) 'edit) | |
415 ((= n 3) 'perm) | |
416 ((= n 4) 'global) | |
417 ((= n 5) 'save) | |
418 (t 'local))) | |
419 (message (cond ((and (eq calc-mode-save-mode 'local) calc-embedded-info) | |
420 "Recording mode changes with [calc-mode: ...]") | |
421 ((eq calc-mode-save-mode 'edit) | |
422 "Recording mode changes with [calc-edit-mode: ...]") | |
423 ((eq calc-mode-save-mode 'perm) | |
424 "Recording mode changes with [calc-perm-mode: ...]") | |
425 ((eq calc-mode-save-mode 'global) | |
426 "Recording mode changes with [calc-global-mode: ...]") | |
427 ((eq calc-mode-save-mode 'save) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
428 (format "Recording mode changes in \"%s\"" |
40785 | 429 calc-settings-file)) |
430 (t | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
431 "Not recording mode changes permanently"))))) |
40785 | 432 |
433 (defun calc-total-algebraic-mode (flag) | |
434 (interactive "P") | |
435 (if calc-emacs-type-19 | |
436 (error "Total algebraic mode not yet supported for Emacs 19")) | |
437 (calc-wrapper | |
438 (if (eq calc-algebraic-mode 'total) | |
439 (calc-algebraic-mode nil) | |
440 (calc-change-mode '(calc-algebraic-mode calc-incomplete-algebraic-mode) | |
441 '(total nil)) | |
442 (use-local-map calc-alg-map) | |
443 (message | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
444 "All keys begin algebraic entry; use Meta (ESC) for Calc keys")))) |
40785 | 445 |
446 (defun calc-algebraic-mode (flag) | |
447 (interactive "P") | |
448 (calc-wrapper | |
449 (if flag | |
450 (calc-change-mode '(calc-algebraic-mode | |
451 calc-incomplete-algebraic-mode) | |
452 (list nil (not calc-incomplete-algebraic-mode))) | |
453 (calc-change-mode '(calc-algebraic-mode calc-incomplete-algebraic-mode) | |
454 (list (not calc-algebraic-mode) nil))) | |
455 (use-local-map calc-mode-map) | |
456 (message (if calc-algebraic-mode | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
457 "Numeric keys and ( and [ begin algebraic entry" |
40785 | 458 (if calc-incomplete-algebraic-mode |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
459 "Only ( and [ begin algebraic entry" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
460 "No keys except ' and $ begin algebraic entry"))))) |
40785 | 461 |
462 (defun calc-symbolic-mode (n) | |
463 (interactive "P") | |
464 (calc-wrapper | |
465 | |
466 (message (if (calc-change-mode 'calc-symbolic-mode n nil t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
467 "Inexact computations like sqrt(2) are deferred" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
468 "Numerical computations are always done immediately")))) |
40785 | 469 |
470 (defun calc-infinite-mode (n) | |
471 (interactive "P") | |
472 (calc-wrapper | |
473 (if (eq n 0) | |
474 (progn | |
475 (calc-change-mode 'calc-infinite-mode 1) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
476 (message "Computations like 1 / 0 produce \"inf\"")) |
40785 | 477 (message (if (calc-change-mode 'calc-infinite-mode n nil t) |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
478 "Computations like 1 / 0 produce \"uinf\"" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
479 "Computations like 1 / 0 are left unsimplified"))))) |
40785 | 480 |
481 (defun calc-matrix-mode (arg) | |
482 (interactive "P") | |
483 (calc-wrapper | |
484 (calc-change-mode 'calc-matrix-mode | |
485 (cond ((eq arg 0) 'scalar) | |
486 ((< (prefix-numeric-value arg) 1) | |
487 (and (< (prefix-numeric-value arg) -1) 'matrix)) | |
488 (arg (prefix-numeric-value arg)) | |
489 ((eq calc-matrix-mode 'matrix) 'scalar) | |
490 ((eq calc-matrix-mode 'scalar) nil) | |
491 (t 'matrix))) | |
492 (if (integerp calc-matrix-mode) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
493 (message "Variables are assumed to be %dx%d matrices" |
40785 | 494 calc-matrix-mode calc-matrix-mode) |
495 (message (if (eq calc-matrix-mode 'matrix) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
496 "Variables are assumed to be matrices" |
40785 | 497 (if calc-matrix-mode |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
498 "Variables are assumed to be scalars (non-matrices)" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
499 "Variables are not assumed to be matrix or scalar")))))) |
40785 | 500 |
501 (defun calc-set-simplify-mode (mode arg msg) | |
502 (calc-change-mode 'calc-simplify-mode | |
503 (if arg | |
504 (and (> (prefix-numeric-value arg) 0) | |
505 mode) | |
506 (and (not (eq calc-simplify-mode mode)) | |
507 mode))) | |
508 (message (if (eq calc-simplify-mode mode) | |
509 msg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
510 "Default simplifications enabled"))) |
40785 | 511 |
512 (defun calc-no-simplify-mode (arg) | |
513 (interactive "P") | |
514 (calc-wrapper | |
515 (calc-set-simplify-mode 'none arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
516 "All default simplifications are disabled"))) |
40785 | 517 |
518 (defun calc-num-simplify-mode (arg) | |
519 (interactive "P") | |
520 (calc-wrapper | |
521 (calc-set-simplify-mode 'num arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
522 "Default simplifications apply only if arguments are numeric"))) |
40785 | 523 |
524 (defun calc-default-simplify-mode (arg) | |
525 (interactive "p") | |
526 (cond ((= arg 1) | |
527 (calc-wrapper | |
528 (calc-set-simplify-mode | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
529 nil nil "Usual default simplifications are enabled"))) |
40785 | 530 ((= arg 0) (calc-num-simplify-mode 1)) |
531 ((< arg 0) (calc-no-simplify-mode 1)) | |
532 ((= arg 2) (calc-bin-simplify-mode 1)) | |
533 ((= arg 3) (calc-alg-simplify-mode 1)) | |
534 ((= arg 4) (calc-ext-simplify-mode 1)) | |
535 ((= arg 5) (calc-units-simplify-mode 1)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
536 (t (error "Prefix argument out of range")))) |
40785 | 537 |
538 (defun calc-bin-simplify-mode (arg) | |
539 (interactive "P") | |
540 (calc-wrapper | |
541 (calc-set-simplify-mode 'binary arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
542 (format "Binary simplification occurs by default (word size=%d)" |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
543 calc-word-size)))) |
40785 | 544 |
545 (defun calc-alg-simplify-mode (arg) | |
546 (interactive "P") | |
547 (calc-wrapper | |
548 (calc-set-simplify-mode 'alg arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
549 "Algebraic simplification occurs by default"))) |
40785 | 550 |
551 (defun calc-ext-simplify-mode (arg) | |
552 (interactive "P") | |
553 (calc-wrapper | |
554 (calc-set-simplify-mode 'ext arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
555 "Extended algebraic simplification occurs by default"))) |
40785 | 556 |
557 (defun calc-units-simplify-mode (arg) | |
558 (interactive "P") | |
559 (calc-wrapper | |
560 (calc-set-simplify-mode 'units arg | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
561 "Units simplification occurs by default"))) |
40785 | 562 |
563 (defun calc-auto-recompute (arg) | |
564 (interactive "P") | |
565 (calc-wrapper | |
566 (calc-change-mode 'calc-auto-recompute arg nil t) | |
567 (calc-refresh-evaltos) | |
568 (message (if calc-auto-recompute | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
569 "Automatically recomputing `=>' forms when necessary" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
570 "Not recomputing `=>' forms automatically")))) |
40785 | 571 |
572 (defun calc-working (n) | |
573 (interactive "P") | |
574 (calc-wrapper | |
575 (cond ((consp n) | |
576 (calc-pop-push-record 0 "work" | |
577 (cond ((eq calc-display-working-message t) 1) | |
578 (calc-display-working-message 2) | |
579 (t 0)))) | |
580 ((eq n 2) (calc-change-mode 'calc-display-working-message 'lots)) | |
581 ((eq n 0) (calc-change-mode 'calc-display-working-message nil)) | |
582 ((eq n 1) (calc-change-mode 'calc-display-working-message t))) | |
583 (cond ((eq calc-display-working-message t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
584 (message "\"Working...\" messages enabled")) |
40785 | 585 (calc-display-working-message |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
586 (message "Detailed \"Working...\" messages enabled")) |
40785 | 587 (t |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
588 (message "\"Working...\" messages disabled"))))) |
40785 | 589 |
590 (defun calc-always-load-extensions () | |
591 (interactive) | |
592 (calc-wrapper | |
593 (if (setq calc-always-load-extensions (not calc-always-load-extensions)) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
594 (message "Always loading extensions package") |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
595 (message "Loading extensions package on demand only")))) |
40785 | 596 |
597 | |
598 (defun calc-matrix-left-justify () | |
599 (interactive) | |
600 (calc-wrapper | |
601 (calc-change-mode 'calc-matrix-just nil t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
602 (message "Matrix elements will be left-justified in columns"))) |
40785 | 603 |
604 (defun calc-matrix-center-justify () | |
605 (interactive) | |
606 (calc-wrapper | |
607 (calc-change-mode 'calc-matrix-just 'center t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
608 (message "Matrix elements will be centered in columns"))) |
40785 | 609 |
610 (defun calc-matrix-right-justify () | |
611 (interactive) | |
612 (calc-wrapper | |
613 (calc-change-mode 'calc-matrix-just 'right t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
614 (message "Matrix elements will be right-justified in columns"))) |
40785 | 615 |
616 (defun calc-full-vectors (n) | |
617 (interactive "P") | |
618 (calc-wrapper | |
619 (message (if (calc-change-mode 'calc-full-vectors n t t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
620 "Displaying long vectors in full" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
621 "Displaying long vectors in [a, b, c, ..., z] notation")))) |
40785 | 622 |
623 (defun calc-full-trail-vectors (n) | |
624 (interactive "P") | |
625 (calc-wrapper | |
626 (message (if (calc-change-mode 'calc-full-trail-vectors n nil t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
627 "Recording long vectors in full" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
628 "Recording long vectors in [a, b, c, ..., z] notation")))) |
40785 | 629 |
630 (defun calc-break-vectors (n) | |
631 (interactive "P") | |
632 (calc-wrapper | |
633 (message (if (calc-change-mode 'calc-break-vectors n t t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
634 "Displaying vector elements one-per-line" |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
635 "Displaying vector elements all on one line")))) |
40785 | 636 |
637 (defun calc-vector-commas () | |
638 (interactive) | |
639 (calc-wrapper | |
640 (if (calc-change-mode 'calc-vector-commas (if calc-vector-commas nil ",") t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
641 (message "Separating vector elements with \",\"") |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
642 (message "Separating vector elements with spaces")))) |
40785 | 643 |
644 (defun calc-vector-brackets () | |
645 (interactive) | |
646 (calc-wrapper | |
647 (if (calc-change-mode 'calc-vector-brackets | |
648 (if (equal calc-vector-brackets "[]") nil "[]") t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
649 (message "Surrounding vectors with \"[]\"") |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
650 (message "Not surrounding vectors with brackets")))) |
40785 | 651 |
652 (defun calc-vector-braces () | |
653 (interactive) | |
654 (calc-wrapper | |
655 (if (calc-change-mode 'calc-vector-brackets | |
656 (if (equal calc-vector-brackets "{}") nil "{}") t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
657 (message "Surrounding vectors with \"{}\"") |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
658 (message "Not surrounding vectors with brackets")))) |
40785 | 659 |
660 (defun calc-vector-parens () | |
661 (interactive) | |
662 (calc-wrapper | |
663 (if (calc-change-mode 'calc-vector-brackets | |
664 (if (equal calc-vector-brackets "()") nil "()") t) | |
41268
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
665 (message "Surrounding vectors with \"()\"") |
ca690490ae62
(calc-settings-file-name, calc-save-modes): Handle null
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
666 (message "Not surrounding vectors with brackets")))) |
40785 | 667 |
668 (defun calc-matrix-brackets (arg) | |
669 (interactive "sCode letters (R, O, C, P): ") | |
670 (calc-wrapper | |
671 (let ((code (append (and (string-match "[rR]" arg) '(R)) | |
672 (and (string-match "[oO]" arg) '(O)) | |
673 (and (string-match "[cC]" arg) '(C)) | |
674 (and (string-match "[pP]" arg) '(P)))) | |
675 (bad (string-match "[^rRoOcCpP ]" arg))) | |
676 (if bad | |
677 (error "Unrecognized character: %c" (aref arg bad))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
678 (calc-change-mode 'calc-matrix-brackets code t)))) |
40785 | 679 |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40997
diff
changeset
|
680 ;;; calc-mode.el ends here |