Mercurial > emacs
annotate lisp/calc/calc-menu.el @ 86607:dce71e88790f
Move here from lisp/nxml/char-name/unicode
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 28 Nov 2007 05:01:59 +0000 |
parents | 57027a3a29e3 |
children | 30324258d04e |
rev | line source |
---|---|
86075 | 1 ;;; calc-menu.el --- a menu for Calc |
2 | |
3 ;; Copyright (C) 2007 Free Software Foundation, Inc. | |
4 | |
5 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 3, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
22 ;; Boston, MA 02110-1301, USA. | |
23 | |
24 ;;; Commentary: | |
25 | |
26 (defvar calc-arithmetic-menu | |
27 (list "Arithmetic" | |
28 (list "Basic" | |
29 ["-(1:)" calc-change-sign :keys "n"] | |
30 ["(2:) + (1:)" calc-plus :keys "+"] | |
31 ["(2:) - (1:)" calc-minus :keys "-"] | |
32 ["(2:) * (1:)" calc-times :keys "*"] | |
33 ["(2:) / (1:)" calc-divide :keys "/"] | |
34 ["(2:) ^ (1:)" calc-power :keys "^"] | |
35 ["(2:) ^ (1/(1:))" | |
36 (progn | |
37 (require 'calc-ext) | |
38 (let ((calc-inverse-flag t)) | |
39 (call-interactively 'calc-power))) | |
40 :keys "I ^" | |
41 :help "The (1:)th root of (2:)"] | |
42 ["abs(1:)" | |
43 (progn | |
44 (require 'calc-arith) | |
45 (call-interactively 'calc-abs)) | |
46 :keys "A" | |
47 :help "Absolute value"] | |
48 ["1/(1:)" | |
49 (progn | |
50 (require 'calc-arith) | |
51 (call-interactively 'calc-inv)) | |
52 :keys "&"] | |
53 ["sqrt(1:)" | |
54 (progn | |
55 (require 'calc-math) | |
56 (call-interactively 'calc-sqrt)) | |
57 :keys "Q"] | |
58 ["idiv(2:,1:)" | |
59 (progn | |
60 (require 'calc-arith) | |
61 (call-interactively 'calc-idiv)) | |
62 :keys "\\" | |
63 :help "The integer quotient of (2:) over (1:)"] | |
64 ["(2:) mod (1:)" | |
65 (progn | |
66 (require 'calc-misc) | |
67 (call-interactively 'calc-mod)) | |
68 :keys "%" | |
69 :help "The remainder when (2:) is divided by (1:)"]) | |
70 (list "Rounding" | |
71 ["floor(1:)" | |
72 (progn | |
73 (require 'calc-arith) | |
74 (call-interactively 'calc-floor)) | |
75 :keys "F" | |
76 :help "The greatest integer less than or equal to (1:)"] | |
77 ["ceiling(1:)" | |
78 (progn | |
79 (require 'calc-arith) | |
80 (call-interactively 'calc-ceiling)) | |
81 :keys "I F" | |
82 :help "The smallest integer greater than or equal to (1:)"] | |
83 ["round(1:)" | |
84 (progn | |
85 (require 'calc-arith) | |
86 (call-interactively 'calc-round)) | |
87 :keys "R" | |
88 :help "The nearest integer to (1:)"] | |
89 ["truncate(1:)" | |
90 (progn | |
91 (require 'calc-arith) | |
92 (call-interactively 'calc-trunc)) | |
93 :keys "I R" | |
94 :help "The integer part of (1:)"]) | |
95 (list "Complex Numbers" | |
96 ["Re(1:)" | |
97 (progn | |
98 (require 'calc-cplx) | |
99 (call-interactively 'calc-re)) | |
100 :keys "f r"] | |
101 ["Im(1:)" | |
102 (progn | |
103 (require 'calc-cplx) | |
104 (call-interactively 'calc-im)) | |
105 :keys "f i"] | |
106 ["conj(1:)" | |
107 (progn | |
108 (require 'calc-cplx) | |
109 (call-interactively 'calc-conj)) | |
110 :keys "J" | |
111 :help "The complex conjugate of (1:)"] | |
112 ["length(1:)" | |
113 (progn (require 'calc-arith) | |
114 (call-interactively 'calc-abs)) | |
115 :keys "A" | |
116 :help "The length (absolute value) of (1:)"] | |
117 ["arg(1:)" | |
118 (progn | |
119 (require 'calc-cplx) | |
120 (call-interactively 'calc-argument)) | |
121 :keys "G" | |
122 :help "The argument (polar angle) of (1:)"]) | |
123 (list "Conversion" | |
124 ["Convert (1:) to a float" | |
125 (progn | |
126 (require 'calc-ext) | |
127 (call-interactively 'calc-float)) | |
128 :keys "c f"] | |
129 ["Convert (1:) to a fraction" | |
130 (progn | |
131 (require 'calc-ext) | |
132 (call-interactively 'calc-fraction)) | |
133 :keys "c F"]) | |
134 (list "Binary" | |
135 ["Set word size" | |
136 (progn | |
137 (require 'calc-bin) | |
138 (call-interactively 'calc-word-size)) | |
139 :keys "b w"] | |
140 ["Clip (1:) to word size" | |
141 (progn | |
142 (require 'calc-bin) | |
143 (call-interactively 'calc-clip)) | |
144 :keys "b c" | |
145 :help "Reduce (1:) modulo 2^wordsize"] | |
146 ["(2:) and (1:)" | |
147 (progn | |
148 (require 'calc-bin) | |
149 (call-interactively 'calc-and)) | |
150 :keys "b a" | |
151 :help "Bitwise AND [modulo 2^wordsize]"] | |
152 ["(2:) or (1:)" | |
153 (progn | |
154 (require 'calc-bin) | |
155 (call-interactively 'calc-or)) | |
156 :keys "b o" | |
157 :help "Bitwise inclusive OR [modulo 2^wordsize]"] | |
158 ["(2:) xor (1:)" | |
159 (progn | |
160 (require 'calc-bin) | |
161 (call-interactively 'calc-xor)) | |
162 :keys "b x" | |
163 :help "Bitwise exclusive OR [modulo 2^wordsize]"] | |
164 ["diff(2:,1:)" | |
165 (progn | |
166 (require 'calc-bin) | |
167 (call-interactively 'calc-diff)) | |
168 :keys "b d" | |
169 :help "Bitwise difference [modulo 2^wordsize]"] | |
170 ["not (1:)" | |
171 (progn | |
172 (require 'calc-bin) | |
173 (call-interactively 'calc-not)) | |
174 :keys "b n" | |
175 :help "Bitwise NOT [modulo 2^wordsize]"] | |
176 ["left shift(1:)" | |
177 (progn | |
178 (require 'calc-bin) | |
179 (call-interactively 'calc-lshift-binary)) | |
180 :keys "b l" | |
181 :help "Shift (1:)[modulo 2^wordsize] one bit left"] | |
182 ["right shift(1:)" | |
183 (progn | |
184 (require 'calc-bin) | |
185 (call-interactively 'calc-rshift-binary)) | |
186 :keys "b r" | |
187 :help "Shift (1:)[modulo 2^wordsize] one bit right, putting 0s on the left"] | |
188 ["arithmetic right shift(1:)" | |
189 (progn | |
190 (require 'calc-bin) | |
191 (call-interactively 'calc-rshift-arith)) | |
192 :keys "b R" | |
193 :help "Shift (1:)[modulo 2^wordsize] one bit right, duplicating the leftmost bit"] | |
194 ["rotate(1:)" | |
195 (progn | |
196 (require 'calc-bin) | |
197 (call-interactively 'calc-rotate-binary)) | |
198 :keys "b t" | |
199 :help "Rotate (1:)[modulo 2^wordsize] one bit left"]) | |
200 "-------" | |
201 ["Help on Arithmetic" | |
202 (calc-info-goto-node "Arithmetic")]) | |
203 "Menu for Calc's arithmetic functions.") | |
204 | |
205 (defvar calc-scientific-function-menu | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
206 (list "Scientific Functions" |
86075 | 207 (list "Constants" |
208 ["pi" | |
209 (progn | |
210 (require 'calc-math) | |
211 (call-interactively 'calc-pi)) | |
212 :keys "P"] | |
213 ["e" | |
214 (progn | |
215 (require 'calc-math) | |
216 (let ((calc-hyperbolic-flag t)) | |
217 (call-interactively 'calc-pi))) | |
218 :keys "H P"] | |
219 ["phi" | |
220 (progn | |
221 (require 'calc-math) | |
222 (let ((calc-inverse-flag t) | |
223 (calc-hyperbolic-flag t)) | |
224 (call-interactively 'calc-pi))) | |
225 :keys "I H P" | |
226 :help "The golden ratio"] | |
227 ["gamma" | |
228 (progn | |
229 (require 'calc-math) | |
230 (let ((calc-inverse-flag t)) | |
231 (call-interactively 'calc-pi))) | |
232 :keys "I P" | |
233 :help "Euler's constant"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
234 (list "Logs and Exps" |
86075 | 235 ["ln(1:)" |
236 (progn | |
237 (require 'calc-math) | |
238 (call-interactively 'calc-ln)) | |
239 :keys "L" | |
240 :help "The natural logarithm"] | |
241 ["e^(1:)" | |
242 (progn | |
243 (require 'calc-math) | |
244 (call-interactively 'calc-exp)) | |
245 :keys "E"] | |
246 ["log(1:) [base 10]" | |
247 (progn | |
248 (require 'calc-math) | |
249 (call-interactively 'calc-log10)) | |
250 :keys "H L" | |
251 :help "The common logarithm"] | |
252 ["10^(1:)" | |
253 (progn | |
254 (require 'calc-math) | |
255 (let ((calc-inverse-flag t)) | |
256 (call-interactively 'calc-log10))) | |
257 :keys "I H L"] | |
258 ["log(2:) [base(1:)]" | |
259 (progn | |
260 (require 'calc-math) | |
261 (call-interactively 'calc-log)) | |
262 :keys "B" | |
263 :help "The logarithm with an arbitrary base"] | |
264 ["(2:) ^ (1:)" | |
265 calc-power | |
266 :keys "^"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
267 (list "Trigonometric Functions" |
86075 | 268 ["sin(1:)" |
269 (progn | |
270 (require 'calc-math) | |
271 (call-interactively 'calc-sin)) | |
272 :keys "S"] | |
273 ["cos(1:)" | |
274 (progn | |
275 (require 'calc-math) | |
276 (call-interactively 'calc-cos)) | |
277 :keys "C"] | |
278 ["tan(1:)" | |
279 (progn | |
280 (require 'calc-math) | |
281 (call-interactively 'calc-tan)) | |
282 :keys "T"] | |
283 ["arcsin(1:)" | |
284 (progn | |
285 (require 'calc-math) | |
286 (call-interactively 'calc-arcsin)) | |
287 :keys "I S"] | |
288 ["arccos(1:)" | |
289 (progn | |
290 (require 'calc-math) | |
291 (call-interactively 'calc-arccos)) | |
292 :keys "I C"] | |
293 ["arctan(1:)" | |
294 (progn | |
295 (require 'calc-math) | |
296 (call-interactively 'calc-arctan)) | |
297 :keys "I T"] | |
298 ["arctan2(2:,1:)" | |
299 (progn | |
300 (require 'calc-math) | |
301 (call-interactively 'calc-arctan2)) | |
302 :keys "f T"] | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
303 "--Angle Measure--" |
86075 | 304 ["Radians" |
305 (progn | |
306 (require 'calc-math) | |
307 (calc-radians-mode)) | |
308 :keys "m r" | |
309 :style radio | |
310 :selected (eq calc-angle-mode 'rad)] | |
311 ["Degrees" | |
312 (progn | |
313 (require 'calc-math) | |
314 (calc-degrees-mode)) | |
315 :keys "m d" | |
316 :style radio | |
317 :selected (eq calc-angle-mode 'deg)] | |
318 ["HMS" | |
319 (progn | |
320 (require 'calc-math) | |
321 (calc-hms-mode)) | |
322 :keys "m h" | |
323 :style radio | |
324 :selected (eq calc-angle-mode 'hms)]) | |
325 (list "Hyperbolic Functions" | |
326 ["sinh(1:)" | |
327 (progn | |
328 (require 'calc-math) | |
329 (call-interactively 'calc-sinh)) | |
330 :keys "H S"] | |
331 ["cosh(1:)" | |
332 (progn | |
333 (require 'calc-math) | |
334 (call-interactively 'calc-cosh)) | |
335 :keys "H C"] | |
336 ["tanh(1:)" | |
337 (progn | |
338 (require 'calc-math) | |
339 (call-interactively 'calc-tanh)) | |
340 :keys "H T"] | |
341 ["arcsinh(1:)" | |
342 (progn | |
343 (require 'calc-math) | |
344 (call-interactively 'calc-arcsinh)) | |
345 :keys "I H S"] | |
346 ["arccosh(1:)" | |
347 (progn | |
348 (require 'calc-math) | |
349 (call-interactively 'calc-arccosh)) | |
350 :keys "I H C"] | |
351 ["arctanh(1:)" | |
352 (progn | |
353 (require 'calc-math) | |
354 (call-interactively 'calc-arctanh)) | |
355 :keys "I H T"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
356 (list "Advanced Math Functions" |
86075 | 357 ["Gamma(1:)" |
358 (progn | |
359 (require 'calc-comb) | |
360 (call-interactively 'calc-gamma)) | |
361 :keys "f g" | |
362 :help "The Euler Gamma function"] | |
363 ["GammaP(2:,1:)" | |
364 (progn | |
365 (require 'calc-funcs) | |
366 (call-interactively 'calc-inc-gamma)) | |
367 :keys "f G" | |
368 :help "The lower incomplete Gamma function"] | |
369 ["Beta(2:,1:)" | |
370 (progn | |
371 (require 'calc-funcs) | |
372 (call-interactively 'calc-beta)) | |
373 :keys "f b" | |
374 :help "The Euler Beta function"] | |
375 ["BetaI(3:,2:,1:)" | |
376 (progn | |
377 (require 'calc-funcs) | |
378 (call-interactively 'calc-inc-beta)) | |
379 :keys "f B" | |
380 :help "The incomplete Beta function"] | |
381 ["erf(1:)" | |
382 (progn | |
383 (require 'calc-funcs) | |
384 (call-interactively 'calc-erf)) | |
385 :keys "f e" | |
386 :help "The error function"] | |
387 ["BesselJ(2:,1:)" | |
388 (progn | |
389 (require 'calc-funcs) | |
390 (call-interactively 'calc-bessel-J)) | |
391 :keys "f j" | |
392 :help "The Bessel function of the first kind (of order (2:))"] | |
393 ["BesselY(2:,1:)" | |
394 (progn | |
395 (require 'calc-funcs) | |
396 (call-interactively 'calc-bessel-Y)) | |
397 :keys "f y" | |
398 :help "The Bessel function of the second kind (of order (2:))"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
399 (list "Combinatorial Functions" |
86075 | 400 ["gcd(2:,1:)" |
401 (progn | |
402 (require 'calc-comb) | |
403 (call-interactively 'calc-gcd)) | |
404 :keys "k g"] | |
405 ["lcm(2:,1:)" | |
406 (progn | |
407 (require 'calc-comb) | |
408 (call-interactively 'calc-lcm)) | |
409 :keys "k l"] | |
410 ["factorial(1:)" | |
411 (progn | |
412 (require 'calc-comb) | |
413 (call-interactively 'calc-factorial)) | |
414 :keys "!"] | |
415 ["(2:) choose (1:)" | |
416 (progn | |
417 (require 'calc-comb) | |
418 (call-interactively 'calc-choose)) | |
419 :keys "k c"] | |
420 ["permutations(2:,1:)" | |
421 (progn | |
422 (require 'calc-comb) | |
423 (call-interactively 'calc-perm)) | |
424 :keys "H k c"] | |
425 ["Primality test for (1:)" | |
426 (progn | |
427 (require 'calc-comb) | |
428 (call-interactively 'calc-prime-test)) | |
429 :keys "k p" | |
430 :help "For large (1:), a probabilistic test"] | |
431 ["Factor (1:) into primes" | |
432 (progn | |
433 (require 'calc-comb) | |
434 (call-interactively 'calc-prime-factors)) | |
435 :keys "k f"] | |
436 ["Next prime after (1:)" | |
437 (progn | |
438 (require 'calc-comb) | |
439 (call-interactively 'calc-next-prime)) | |
440 :keys "k n"] | |
441 ["Previous prime before (1:)" | |
442 (progn | |
443 (require 'calc-comb) | |
444 (call-interactively 'calc-prev-prime)) | |
445 :keys "I k n"] | |
446 ["phi(1:)" | |
447 (progn | |
448 (require 'calc-comb) | |
449 (call-interactively 'calc-totient)) | |
450 :keys "k n" | |
451 :help "Euler's totient function"] | |
452 ["random(1:)" | |
453 (progn | |
454 (require 'calc-comb) | |
455 (call-interactively 'calc-random)) | |
456 :keys "k r" | |
457 :help "A random number >=1 and < (1:)"]) | |
458 "----" | |
459 ["Help on Scientific Functions" | |
460 (calc-info-goto-node "Scientific Functions")]) | |
461 "Menu for Calc's scientific functions.") | |
462 | |
463 (defvar calc-algebra-menu | |
464 (list "Algebra" | |
465 (list "Simplification" | |
466 ["Simplify (1:)" | |
467 (progn | |
468 (require 'calc-alg) | |
469 (call-interactively 'calc-simplify)) | |
470 :keys "a s"] | |
471 ["Simplify (1:) with extended rules" | |
472 (progn | |
473 (require 'calc-alg) | |
474 (call-interactively 'calc-simplify-extended)) | |
475 :keys "a e" | |
476 :help "Apply possibly unsafe simplifications"]) | |
477 (list "Manipulation" | |
478 ["Expand formula (1:)" | |
479 (progn | |
480 (require 'calc-alg) | |
481 (call-interactively 'calc-expand-formula)) | |
482 :keys "a \"" | |
483 :help "Expand (1:) into its defining formula, if possible"] | |
484 ["Evaluate variables in (1:)" | |
485 (progn | |
486 (require 'calc-ext) | |
487 (call-interactively 'calc-evaluate)) | |
488 :keys "="] | |
489 ["Make substitution in (1:)" | |
490 (progn | |
491 (require 'calc-alg) | |
492 (call-interactively 'calc-substitute)) | |
493 :keys "a b" | |
494 :help | |
495 "Substitute all occurrences of a sub-expression with a new sub-expression"]) | |
496 (list "Polynomials" | |
497 ["Factor (1:)" | |
498 (progn | |
499 (require 'calc-alg) | |
500 (call-interactively 'calc-factor)) | |
501 :keys "a f"] | |
502 ["Collect terms in (1:)" | |
503 (progn | |
504 (require 'calc-alg) | |
505 (call-interactively 'calc-collect)) | |
506 :keys "a c" | |
507 :help "Arrange as a polynomial in a given variable"] | |
508 ["Expand (1:)" | |
509 (progn | |
510 (require 'calc-alg) | |
511 (call-interactively 'calc-expand)) | |
512 :keys "a x" | |
513 :help "Apply distributive law everywhere"] | |
514 ["Find roots of (1:)" | |
515 (progn | |
516 (require 'calcalg2) | |
517 (call-interactively 'calc-poly-roots)) | |
518 :keys "a P"]) | |
519 (list "Calculus" | |
520 ["Differentiate (1:)" | |
521 (progn | |
522 (require 'calcalg2) | |
523 (call-interactively 'calc-derivative)) | |
524 :keys "a d"] | |
525 ["Integrate (1:) [indefinite]" | |
526 (progn | |
527 (require 'calcalg2) | |
528 (call-interactively 'calc-integral)) | |
529 :keys "a i"] | |
530 ["Integrate (1:) [definite]" | |
531 (progn | |
532 (require 'calcalg2) | |
533 (let ((var (read-string "Integration variable: "))) | |
534 (calc-tabular-command 'calcFunc-integ "Integration" | |
535 "intg" nil var nil nil))) | |
536 :keys "C-u a i"] | |
537 ["Integrate (1:) [numeric]" | |
538 (progn | |
539 (require 'calcalg2) | |
540 (call-interactively 'calc-num-integral)) | |
541 :keys "a I" | |
542 :help "Integrate using the open Romberg method"] | |
543 ["Taylor expand (1:)" | |
544 (progn | |
545 (require 'calcalg2) | |
546 (call-interactively 'calc-taylor)) | |
547 :keys "a t"] | |
548 ["Minimize (2:) [initial guess = (1:)]" | |
549 (progn | |
550 (require 'calcalg3) | |
551 (call-interactively 'calc-find-minimum)) | |
552 :keys "a N" | |
553 :help "Find a local minimum"] | |
554 ["Maximize (2:) [initial guess = (1:)]" | |
555 (progn | |
556 (require 'calcalg3) | |
557 (call-interactively 'calc-find-maximum)) | |
558 :keys "a X" | |
559 :help "Find a local maximum"]) | |
560 (list "Solving" | |
561 ["Solve equation (1:)" | |
562 (progn | |
563 (require 'calcalg2) | |
564 (call-interactively 'calc-solve-for)) | |
565 :keys "a S"] | |
566 ["Solve equation (2:) numerically [initial guess = (1:)]" | |
567 (progn | |
568 (require 'calcalg3) | |
569 (call-interactively 'calc-find-root)) | |
570 :keys "a R"] | |
571 ["Find roots of polynomial (1:)" | |
572 (progn | |
573 (require 'calcalg2) | |
574 (call-interactively 'calc-poly-roots)) | |
575 :keys "a P"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
576 (list "Curve Fitting" |
86075 | 577 ["Fit (1:)=[x values, y values] to a curve" |
578 (progn | |
579 (require 'calcalg3) | |
580 (call-interactively 'calc-curve-fit)) | |
581 :keys "a F"]) | |
582 "----" | |
583 ["Help on Algebra" | |
584 (calc-info-goto-node "Algebra")]) | |
585 "Menu for Calc's algebraic facilities.") | |
586 | |
587 | |
588 (defvar calc-graphics-menu | |
589 (list "Graphics" | |
590 ["Graph 2D [(1:)= y values, (2:)= x values]" | |
591 (progn | |
592 (require 'calc-graph) | |
593 (call-interactively 'calc-graph-fast)) | |
594 :keys "g f"] | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
595 ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]" |
86075 | 596 (progn |
597 (require 'calc-graph) | |
598 (call-interactively 'calc-graph-fast-3d)) | |
599 :keys "g F"] | |
600 "----" | |
601 ["Help on Graphics" | |
602 (calc-info-goto-node "Graphics")]) | |
603 "Menu for Calc's graphics.") | |
604 | |
605 | |
606 (defvar calc-vectors-menu | |
607 (list "Matrices/Vectors" | |
608 (list "Matrices" | |
609 ["(2:) + (1:)" calc-plus :keys "+"] | |
610 ["(2:) - (1:)" calc-minus :keys "-"] | |
611 ["(2:) * (1:)" calc-times :keys "*"] | |
612 ["(1:)^(-1)" | |
613 (progn | |
614 (require 'calc-arith) | |
615 (call-interactively 'calc-inv)) | |
616 :keys "&"] | |
617 ["Create an identity matrix" | |
618 (progn | |
619 (require 'calc-vec) | |
620 (call-interactively 'calc-ident)) | |
621 :keys "v i"] | |
622 ["transpose(1:)" | |
623 (progn | |
624 (require 'calc-vec) | |
625 (call-interactively 'calc-transpose)) | |
626 :keys "v t"] | |
627 ["det(1:)" | |
628 (progn | |
629 (require 'calc-mtx) | |
630 (call-interactively 'calc-mdet)) | |
631 :keys "V D"] | |
632 ["trace(1:)" | |
633 (progn | |
634 (require 'calc-mtx) | |
635 (call-interactively 'calc-mtrace)) | |
636 :keys "V T"] | |
637 ["LUD decompose (1:)" | |
638 (progn | |
639 (require 'calc-mtx) | |
640 (call-interactively 'calc-mlud)) | |
641 :keys "V L"] | |
642 ["Extract a row from (1:)" | |
643 (progn | |
644 (require 'calc-vec) | |
645 (call-interactively 'calc-mrow)) | |
646 :keys "v r"] | |
647 ["Extract a column from (1:)" | |
648 (progn | |
649 (require 'calc-vec) | |
650 (call-interactively 'calc-mcol)) | |
651 :keys "v c"]) | |
652 (list "Vectors" | |
653 ["Extract the first element of (1:)" | |
654 (progn | |
655 (require 'calc-vec) | |
656 (call-interactively 'calc-head)) | |
657 :keys "v h"] | |
658 ["Extract an element from (1:)" | |
659 (progn | |
660 (require 'calc-vec) | |
661 (call-interactively 'calc-mrow)) | |
662 :keys "v r"] | |
663 ["Reverse (1:)" | |
664 (progn | |
665 (require 'calc-vec) | |
666 (call-interactively 'calc-reverse-vector)) | |
667 :keys "v v"] | |
668 ["Unpack (1:)" | |
669 (progn | |
670 (require 'calc-vec) | |
671 (call-interactively 'calc-unpack)) | |
672 :keys "v u" | |
673 :help "Separate the elements of (1:)"] | |
674 ["(2:) cross (1:)" | |
675 (progn | |
676 (require 'calc-vec) | |
677 (call-interactively 'calc-cross)) | |
678 :keys "V C" | |
679 :help "The cross product in R^3"] | |
680 ["(2:) dot (1:)" | |
681 calc-mult | |
682 :keys "*" | |
683 :help "The dot product"] | |
684 ["Map a function across (1:)" | |
685 (progn | |
686 (require 'calc-map) | |
687 (call-interactively 'calc-map)) | |
688 :keys "V M" | |
689 :help "Apply a function to each element"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
690 (list "Vectors As Sets" |
86075 | 691 ["Remove duplicates from (1:)" |
692 (progn | |
693 (require 'calc-vec) | |
694 (call-interactively 'calc-remove-duplicates)) | |
695 :keys "V +"] | |
696 ["(2:) union (1:)" | |
697 (progn | |
698 (require 'calc-vec) | |
699 (call-interactively 'calc-set-union)) | |
700 :keys "V V"] | |
701 ["(2:) intersect (1:)" | |
702 (progn | |
703 (require 'calc-vec) | |
704 (call-interactively 'calc-set-intersect)) | |
705 :keys "V ^"] | |
706 ["(2:) \\ (1:)" | |
707 (progn | |
708 (require 'calc-vec) | |
709 (call-interactively 'calc-set-difference)) | |
710 :keys "V -" | |
711 :help "Set difference"]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
712 (list "Statistics On Vectors" |
86075 | 713 ["length(1:)" |
714 (progn | |
715 (require 'calc-stat) | |
716 (call-interactively 'calc-vector-count)) | |
717 :keys "u #" | |
718 :help "The number of data values"] | |
719 ["sum(1:)" | |
720 (progn | |
721 (require 'calc-stat) | |
722 (call-interactively 'calc-vector-sum)) | |
723 :keys "u +" | |
724 :help "The sum of the data values"] | |
725 ["max(1:)" | |
726 (progn | |
727 (require 'calc-stat) | |
728 (call-interactively 'calc-vector-max)) | |
729 :keys "u x" | |
730 :help "The maximum of the data values"] | |
731 ["min(1:)" | |
732 (progn | |
733 (require 'calc-stat) | |
734 (call-interactively 'calc-vector-min)) | |
735 :keys "u N" | |
736 :help "The minumum of the data values"] | |
737 ["mean(1:)" | |
738 (progn | |
739 (require 'calc-stat) | |
740 (call-interactively 'calc-vector-mean)) | |
741 :keys "u M" | |
742 :help "The average (arithmetic mean) of the data values"] | |
743 ["mean(1:) with error" | |
744 (progn | |
745 (require 'calc-stat) | |
746 (call-interactively 'calc-vector-mean-error)) | |
747 :keys "I u M" | |
748 :help "The average (arithmetic mean) of the data values as an error form"] | |
749 ["sdev(1:)" | |
750 (progn | |
751 (require 'calc-stat) | |
752 (call-interactively 'calc-vector-sdev)) | |
753 :keys "u S" | |
754 :help "The sample sdev, sqrt[sum((values - mean)^2)/(N-1)]"] | |
755 ["variance(1:)" | |
756 (progn | |
757 (require 'calc-stat) | |
758 (call-interactively 'calc-vector-variance)) | |
759 :keys "H u S" | |
760 :help "The sample variance, sum((values - mean)^2)/(N-1)"] | |
761 ["population sdev(1:)" | |
762 (progn | |
763 (require 'calc-stat) | |
764 (call-interactively 'calc-vector-pop-sdev)) | |
765 :keys "I u S" | |
766 :help "The population sdev, sqrt[sum((values - mean)^2)/N]"] | |
767 ["population variance(1:)" | |
768 (progn | |
769 (require 'calc-stat) | |
770 (call-interactively 'calc-vector-pop-variance)) | |
771 :keys "H I u S" | |
772 :help "The population variance, sum((values - mean)^2)/N"] | |
773 ["median(1:)" | |
774 (progn | |
775 (require 'calc-stat) | |
776 (call-interactively 'calc-vector-median)) | |
777 :keys "H u M" | |
778 :help "The median of the data values"] | |
779 ["harmonic mean(1:)" | |
780 (progn | |
781 (require 'calc-stat) | |
782 (call-interactively 'calc-vector-harmonic-mean)) | |
783 :keys "H I u M"] | |
784 ["geometric mean(1:)" | |
785 (progn | |
786 (require 'calc-stat) | |
787 (call-interactively 'calc-vector-geometric-mean)) | |
788 :keys "u G"] | |
789 ["arithmetic-geometric mean(1:)" | |
790 (progn | |
791 (require 'calc-stat) | |
792 (let ((calc-hyperbolic-flag t)) | |
793 (call-interactively 'calc-vector-geometric-mean))) | |
794 :keys "H u G"] | |
795 ["RMS(1:)" | |
796 (progn (require 'calc-arith) | |
797 (call-interactively 'calc-abs)) | |
798 :keys "A" | |
799 :help "The root-mean-square, or quadratic mean"]) | |
800 ["Abbreviate long vectors" | |
801 (progn | |
802 (require 'calc-mode) | |
803 (call-interactively 'calc-full-vectors)) | |
804 :keys "v ." | |
805 :style toggle | |
806 :selected (not calc-full-vectors)] | |
807 "----" | |
808 ["Help on Matrices/Vectors" | |
809 (calc-info-goto-node "Matrix Functions")]) | |
810 "Menu for Calc's vector and matrix functions.") | |
811 | |
812 (defvar calc-units-menu | |
813 (list "Units" | |
814 ["Convert units in (1:)" | |
815 (progn | |
816 (require 'calc-units) | |
817 (call-interactively 'calc-convert-units )) | |
818 :keys "u c"] | |
819 ["Convert temperature in (1:)" | |
820 (progn | |
821 (require 'calc-units) | |
822 (call-interactively 'calc-convert-temperature)) | |
823 :keys "u t"] | |
824 ["Simplify units in (1:)" | |
825 (progn | |
826 (require 'calc-units) | |
827 (call-interactively 'calc-simplify-units)) | |
828 :keys "u s"] | |
829 ["View units table" | |
830 (progn | |
831 (require 'calc-units) | |
832 (call-interactively 'calc-view-units-table)) | |
833 :keys "u V"] | |
834 "----" | |
835 ["Help on Units" | |
836 (calc-info-goto-node "Units")]) | |
837 "Menu for Calc's units functions.") | |
838 | |
839 (defvar calc-variables-menu | |
840 (list "Variables" | |
841 ["Store (1:) into a variable" | |
842 (progn | |
843 (require 'calc-store) | |
844 (call-interactively 'calc-store)) | |
845 :keys "s s"] | |
846 ["Recall a variable value" | |
847 (progn | |
848 (require 'calc-store) | |
849 (call-interactively 'calc-recall )) | |
850 :keys "s r"] | |
851 ["Edit the value of a variable" | |
852 (progn | |
853 (require 'calc-store) | |
854 (call-interactively 'calc-edit-variable)) | |
855 :keys "s e"] | |
856 ["Exchange (1:) with a variable value" | |
857 (progn | |
858 (require 'calc-store) | |
859 (call-interactively 'calc-store-exchange)) | |
860 :keys "s x"] | |
861 ["Clear variable value" | |
862 (progn | |
863 (require 'calc-store) | |
864 (call-interactively 'calc-unstore)) | |
865 :keys "s u"] | |
866 ["Evaluate variables in (1:)" | |
867 (progn | |
868 (require 'calc-ext) | |
869 (call-interactively 'calc-evaluate)) | |
870 :keys "="] | |
871 ["Evaluate (1:), assigning a value to a variable" | |
872 (progn | |
873 (require 'calc-store) | |
874 (call-interactively 'calc-let)) | |
875 :keys "s l" | |
876 :help "Evaluate (1:) under a temporary assignment of a variable"] | |
877 "----" | |
878 ["Help on Variables" | |
879 (calc-info-goto-node "Store and Recall")]) | |
880 "Menu for Calc's variables.") | |
881 | |
882 (defvar calc-stack-menu | |
883 (list "Stack" | |
884 ["Remove (1:)" | |
885 calc-pop | |
886 :keys "DEL"] | |
887 ["Switch (1:) and (2:)" | |
888 calc-roll-down | |
889 :keys "TAB"] | |
890 ["Duplicate (1:)" | |
891 calc-enter | |
892 :keys "RET"] | |
893 ["Edit (1:)" | |
894 (progn | |
895 (require 'calc-yank) | |
896 (call-interactively calc-edit)) | |
897 :keys "`"] | |
898 "----" | |
899 ["Help on Stack" | |
900 (calc-info-goto-node "Stack and Trail")]) | |
901 "Menu for Calc's stack functions.") | |
902 | |
903 (defvar calc-errors-menu | |
904 (list "Undo" | |
905 ["Undo" | |
906 (progn | |
907 (require 'calc-undo) | |
908 (call-interactively 'calc-undo)) | |
909 :keys "U"] | |
910 ["Redo" | |
911 (progn | |
912 (require 'calc-undo) | |
913 (call-interactively 'calc-redo)) | |
914 :keys "D"] | |
915 "----" | |
916 ["Help on Undo" | |
917 (progn | |
918 (calc-info-goto-node "Introduction") | |
919 (Info-goto-node "Undo"))])) | |
920 | |
921 (defvar calc-modes-menu | |
922 (list "Modes" | |
923 ["Precision" | |
924 (progn | |
925 (require 'calc-ext) | |
926 (call-interactively 'calc-precision)) | |
927 :keys "p" | |
928 :help "Set the precision for floating point calculations"] | |
929 ["Fraction mode" | |
930 (progn | |
931 (require 'calc-frac) | |
932 (call-interactively 'calc-frac-mode)) | |
933 :keys "m f" | |
934 :style toggle | |
935 :selected calc-prefer-frac | |
936 :help "Leave integer quotients as fractions"] | |
937 ["Symbolic mode" | |
938 (lambda () | |
939 (interactive) | |
940 (require 'calc-mode) | |
941 (calc-symbolic-mode nil)) | |
942 :keys "m s" | |
943 :style toggle | |
944 :selected calc-symbolic-mode | |
945 :help "Leave functions producing inexact answers in symbolic form"] | |
946 ["Infinite mode" | |
947 (lambda () | |
948 (interactive) | |
949 (require 'calc-mode) | |
950 (calc-infinite-mode nil)) | |
951 :keys "m i" | |
952 :style toggle | |
953 :selected calc-infinite-mode | |
954 :help "Let expressions like 1/0 produce infinite results"] | |
955 ["Abbreviate long vectors" | |
956 (progn | |
957 (require 'calc-mode) | |
958 (call-interactively 'calc-full-vectors)) | |
959 :keys "v ." | |
960 :style toggle | |
961 :selected (not calc-full-vectors)] | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
962 (list "Angle Measure" |
86075 | 963 ["Radians" |
964 (progn | |
965 (require 'calc-math) | |
966 (call-interactively 'calc-radians-mode)) | |
967 :keys "m r" | |
968 :style radio | |
969 :selected (eq calc-angle-mode 'rad)] | |
970 ["Degrees" | |
971 (progn | |
972 (require 'calc-math) | |
973 (call-interactively 'calc-degrees-mode)) | |
974 :keys "m d" | |
975 :style radio | |
976 :selected (eq calc-angle-mode 'deg)] | |
977 ["HMS" | |
978 (progn | |
979 (require 'calc-math) | |
980 (call-interactively 'calc-hms-mode)) | |
981 :keys "m h" | |
982 :style radio | |
983 :selected (eq calc-angle-mode 'hms)]) | |
984 (list "Radix" | |
985 ["Decimal" | |
986 (progn | |
987 (require 'calc-bin) | |
988 (call-interactively 'calc-decimal-radix)) | |
989 :keys "d 0" | |
990 :style radio | |
991 :selected (= calc-number-radix 10)] | |
992 ["Binary" | |
993 (progn | |
994 (require 'calc-bin) | |
995 (call-interactively 'calc-binary-radix)) | |
996 :keys "d 2" | |
997 :style radio | |
998 :selected (= calc-number-radix 2)] | |
999 ["Octal" | |
1000 (progn | |
1001 (require 'calc-bin) | |
1002 (call-interactively 'calc-octal-radix)) | |
1003 :keys "d 8" | |
1004 :style radio | |
1005 :selected (= calc-number-radix 8)] | |
1006 ["Hexadecimal" | |
1007 (progn | |
1008 (require 'calc-bin) | |
1009 (call-interactively 'calc-hex-radix)) | |
1010 :keys "d 6" | |
1011 :style radio | |
1012 :selected (= calc-number-radix 16)] | |
1013 ["Other" | |
1014 (progn | |
1015 (require 'calc-bin) | |
1016 (call-interactively 'calc-radix)) | |
1017 :keys "d r" | |
1018 :style radio | |
1019 :selected (not | |
1020 (or | |
1021 (= calc-number-radix 10) | |
1022 (= calc-number-radix 2) | |
1023 (= calc-number-radix 8) | |
1024 (= calc-number-radix 16)))]) | |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
1025 (list "Float Format" |
86075 | 1026 ["Normal" |
1027 (progn | |
1028 (require 'calc-mode) | |
1029 (call-interactively 'calc-normal-notation)) | |
1030 :keys "d n" | |
1031 :style radio | |
1032 :selected (eq (car-safe calc-float-format) 'float)] | |
1033 ["Fixed point" | |
1034 (progn | |
1035 (require 'calc-mode) | |
1036 (call-interactively 'calc-fix-notation)) | |
1037 :keys "d f" | |
1038 :style radio | |
1039 :selected (eq (car-safe calc-float-format) 'fix)] | |
1040 ["Scientific notation" | |
1041 (progn | |
1042 (require 'calc-mode) | |
1043 (call-interactively 'calc-sci-notation)) | |
1044 :keys "d s" | |
1045 :style radio | |
1046 :selected (eq (car-safe calc-float-format) 'sci)] | |
1047 ["Engineering notation" | |
1048 (progn | |
1049 (require 'calc-mode) | |
1050 (call-interactively 'calc-eng-notation)) | |
1051 :keys "d e" | |
1052 :style radio | |
1053 :selected (eq (car-safe calc-float-format) 'eng)]) | |
1054 (list "Algebraic" | |
86455
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1055 ["Normal" |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1056 (progn |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1057 (require 'calc-mode) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1058 (cond |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1059 (calc-incomplete-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1060 (calc-algebraic-mode t)) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1061 (calc-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1062 (calc-algebraic-mode nil)))) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1063 :style radio |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1064 :selected (not calc-algebraic-mode)] |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
1065 ["Algebraic mode" |
86075 | 1066 (progn |
1067 (require 'calc-mode) | |
86455
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1068 (if (or |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1069 calc-incomplete-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1070 (not calc-algebraic-mode)) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1071 (calc-algebraic-mode nil))) |
86075 | 1072 :keys "m a" |
1073 :style radio | |
86455
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1074 :selected (and calc-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1075 (not calc-incomplete-algebraic-mode)) |
86075 | 1076 :help "Keys which start numeric entry also start algebraic entry"] |
86455
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1077 ["Incomplete algebraic mode" |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1078 (progn |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1079 (require 'calc-mode) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1080 (unless calc-incomplete-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1081 (calc-algebraic-mode t))) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1082 :keys "C-u m a" |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1083 :style radio |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1084 :selected calc-incomplete-algebraic-mode |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1085 :help "Only ( and [ begin algebraic entry"] |
86081
1f9bb7803baa
(calc-scientific-function-menu,calc-algebra-menu,calc-graphics-menu)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86080
diff
changeset
|
1086 ["Total algebraic mode" |
86075 | 1087 (progn |
1088 (require 'calc-mode) | |
86455
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1089 (unless (eq calc-algebraic-mode 'total) |
57027a3a29e3
(calc-modes-menu): Add normal and incomplete algebraic modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86154
diff
changeset
|
1090 (calc-total-algebraic-mode nil))) |
86075 | 1091 :keys "m t" |
1092 :style radio | |
1093 :selected (eq calc-algebraic-mode 'total) | |
1094 :help "All regular letters and punctuation begin algebraic entry"]) | |
86136
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1095 (list "Language" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1096 ["Normal" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1097 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1098 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1099 (call-interactively 'calc-normal-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1100 :keys "d N" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1101 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1102 :selected (eq calc-language nil)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1103 ["Big" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1104 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1105 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1106 (call-interactively 'calc-big-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1107 :keys "d B" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1108 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1109 :selected (eq calc-language 'big) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1110 :help "Use textual approximations to various mathematical notations"] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1111 ["Flat" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1112 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1113 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1114 (call-interactively 'calc-flat-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1115 :keys "d O" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1116 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1117 :selected (eq calc-language 'flat) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1118 :help "Write matrices on a single line"] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1119 ["C" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1120 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1121 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1122 (call-interactively 'calc-c-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1123 :keys "d C" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1124 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1125 :selected (eq calc-language 'c)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1126 ["Pascal" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1127 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1128 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1129 (call-interactively 'calc-pascal-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1130 :keys "d P" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1131 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1132 :selected (eq calc-language 'pascal)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1133 ["Fortran" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1134 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1135 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1136 (call-interactively 'calc-fortran-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1137 :keys "d F" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1138 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1139 :selected (eq calc-language 'fortran)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1140 ["TeX" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1141 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1142 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1143 (call-interactively 'calc-tex-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1144 :keys "d T" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1145 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1146 :selected (eq calc-language 'tex)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1147 ["LaTeX" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1148 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1149 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1150 (call-interactively 'calc-latex-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1151 :keys "d L" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1152 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1153 :selected (eq calc-language 'latex)] |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1154 ["Eqn" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1155 (progn |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1156 (require 'calc-lang) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1157 (call-interactively 'calc-eqn-language)) |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1158 :keys "d E" |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1159 :style radio |
7a8f75e69123
(calc-modes-menu): Add Languages submenu.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86081
diff
changeset
|
1160 :selected (eq calc-language 'eqn)]) |
86075 | 1161 "----" |
1162 ["Save mode settings" calc-save-modes :keys "m m"] | |
1163 "----" | |
1164 ["Help on Modes" | |
1165 (calc-info-goto-node "Mode settings")]) | |
1166 "Menu for Calc's mode settings.") | |
1167 | |
1168 (defvar calc-help-menu | |
1169 (list "Help" | |
1170 ["Manual" | |
1171 calc-info | |
1172 :keys "h i"] | |
1173 ["Tutorial" | |
1174 calc-tutorial | |
1175 :keys "h t"] | |
1176 ["Summary" | |
1177 calc-info-summary | |
1178 :keys "h s"] | |
1179 "----" | |
1180 ["Help on Help" | |
1181 (progn | |
1182 (calc-info-goto-node "Introduction") | |
1183 (Info-goto-node "Help Commands"))]) | |
1184 "Menu for Calc's help functions.") | |
1185 | |
86154 | 1186 (defvar calc-mode-map) |
1187 | |
86075 | 1188 (easy-menu-define |
1189 calc-menu | |
1190 calc-mode-map | |
1191 "Menu for Calc." | |
1192 (list "Calc" | |
86077
65abbd39f5eb
(calc-menu): Make menu visible only in Calc buffer.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
86075
diff
changeset
|
1193 :visible '(eq major-mode 'calc-mode) |
86075 | 1194 calc-arithmetic-menu |
1195 calc-scientific-function-menu | |
1196 calc-algebra-menu | |
1197 calc-graphics-menu | |
1198 calc-vectors-menu | |
1199 calc-units-menu | |
1200 calc-variables-menu | |
1201 calc-stack-menu | |
1202 calc-errors-menu | |
1203 calc-modes-menu | |
1204 calc-help-menu | |
1205 ["Reset" | |
1206 (progn | |
1207 (require 'calc-ext) | |
1208 (call-interactively 'calc-reset)) | |
1209 :help "Reset Calc to its initial state"] | |
1210 ["Quit" calc-quit])) | |
1211 | |
1212 (provide 'calc-menu) | |
86080 | 1213 |
1214 ;; arch-tag: 9612c86a-cd4f-4baa-ab0b-40af7344d21f |