Mercurial > emacs
comparison lisp/calc/calc-help.el @ 40785:2fb9d407ae73
Initial import of Calc 2.02f.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 06 Nov 2001 18:59:06 +0000 |
parents | |
children | 73f364fd8aaa |
comparison
equal
deleted
inserted
replaced
40784:d57f74c55909 | 40785:2fb9d407ae73 |
---|---|
1 ;; Calculator for GNU Emacs, part II [calc-help.el] | |
2 ;; Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. | |
3 ;; Written by Dave Gillespie, daveg@synaptics.com. | |
4 | |
5 ;; This file is part of GNU Emacs. | |
6 | |
7 ;; GNU Emacs is distributed in the hope that it will be useful, | |
8 ;; but WITHOUT ANY WARRANTY. No author or distributor | |
9 ;; accepts responsibility to anyone for the consequences of using it | |
10 ;; or for whether it serves any particular purpose or works at all, | |
11 ;; unless he says so in writing. Refer to the GNU Emacs General Public | |
12 ;; License for full details. | |
13 | |
14 ;; Everyone is granted permission to copy, modify and redistribute | |
15 ;; GNU Emacs, but only under the conditions described in the | |
16 ;; GNU Emacs General Public License. A copy of this license is | |
17 ;; supposed to have been given to you along with GNU Emacs so you | |
18 ;; can know your rights and responsibilities. It should be in a | |
19 ;; file named COPYING. Among other things, the copyright notice | |
20 ;; and this notice must be preserved on all copies. | |
21 | |
22 | |
23 | |
24 ;; This file is autoloaded from calc-ext.el. | |
25 (require 'calc-ext) | |
26 | |
27 (require 'calc-macs) | |
28 | |
29 (defun calc-Need-calc-help () nil) | |
30 | |
31 | |
32 (defun calc-help-prefix (arg) | |
33 "This key is the prefix for Calc help functions. See calc-help-for-help." | |
34 (interactive "P") | |
35 (or calc-dispatch-help (sit-for echo-keystrokes)) | |
36 (let ((key (calc-read-key-sequence | |
37 (if calc-dispatch-help | |
38 "Calc Help options: Help, Info, Tutorial, Summary; Key, Function; ?=more" | |
39 (format "%s (Type ? for a list of Calc Help options)" | |
40 (key-description (this-command-keys)))) | |
41 calc-help-map))) | |
42 (setq key (lookup-key calc-help-map key)) | |
43 (message "") | |
44 (if key | |
45 (call-interactively key) | |
46 (beep))) | |
47 ) | |
48 | |
49 (defun calc-help-for-help (arg) | |
50 "You have typed `h', the Calc help character. Type a Help option: | |
51 | |
52 B calc-describe-bindings. Display a table of all key bindings. | |
53 H calc-full-help. Display all `?' key messages at once. | |
54 | |
55 I calc-info. Read the Calc manual using the Info system. | |
56 T calc-tutorial. Read the Calc tutorial using the Info system. | |
57 S calc-info-summary. Read the Calc summary using the Info system. | |
58 | |
59 C calc-describe-key-briefly. Look up the command name for a given key. | |
60 K calc-describe-key. Look up a key's documentation in the manual. | |
61 F calc-describe-function. Look up a function's documentation in the manual. | |
62 V calc-describe-variable. Look up a variable's documentation in the manual. | |
63 | |
64 N calc-view-news. Display Calc history of changes. | |
65 | |
66 C-c Describe conditions for copying Calc. | |
67 C-d Describe how you can get a new copy of Calc or report a bug. | |
68 C-w Describe how there is no warranty for Calc." | |
69 (interactive "P") | |
70 (if calc-dispatch-help | |
71 (let (key) | |
72 (save-window-excursion | |
73 (describe-function 'calc-help-for-help) | |
74 (select-window (get-buffer-window "*Help*")) | |
75 (while (progn | |
76 (message "Calc Help options: Help, Info, ... press SPC, DEL to scroll, C-g to cancel") | |
77 (memq (car (setq key (calc-read-key t))) | |
78 '(? ?\C-h ?\C-? ?\C-v ?\M-v))) | |
79 (condition-case err | |
80 (if (memq (car key) '(? ?\C-v)) | |
81 (scroll-up) | |
82 (scroll-down)) | |
83 (error (beep))))) | |
84 (calc-unread-command (cdr key)) | |
85 (calc-help-prefix nil)) | |
86 (let ((calc-dispatch-help t)) | |
87 (calc-help-prefix arg))) | |
88 ) | |
89 | |
90 (defun calc-describe-copying () | |
91 (interactive) | |
92 (calc-info) | |
93 (Info-goto-node "Copying") | |
94 ) | |
95 | |
96 (defun calc-describe-distribution () | |
97 (interactive) | |
98 (calc-info) | |
99 (Info-goto-node "Reporting Bugs") | |
100 ) | |
101 | |
102 (defun calc-describe-no-warranty () | |
103 (interactive) | |
104 (calc-info) | |
105 (Info-goto-node "Copying") | |
106 (let ((case-fold-search nil)) | |
107 (search-forward " NO WARRANTY")) | |
108 (beginning-of-line) | |
109 (recenter 0) | |
110 ) | |
111 | |
112 (defun calc-describe-bindings () | |
113 (interactive) | |
114 (describe-bindings) | |
115 (save-excursion | |
116 (set-buffer "*Help*") | |
117 (goto-char (point-min)) | |
118 (if (search-forward "Global bindings:" nil t) | |
119 (delete-region (match-beginning 0) (point-max))) | |
120 (goto-char (point-min)) | |
121 (while (re-search-forward "\n[a-z] ESC" nil t) | |
122 (end-of-line) | |
123 (delete-region (match-beginning 0) (point))) | |
124 (goto-char (point-min)) | |
125 (while (re-search-forward "\nESC m" nil t) | |
126 (end-of-line) | |
127 (delete-region (match-beginning 0) (point))) | |
128 (goto-char (point-min)) | |
129 (while (search-forward "\n\n\n" nil t) | |
130 (backward-delete-char 1) | |
131 (backward-char 2)) | |
132 (goto-char (point-min)) | |
133 (while | |
134 (re-search-forward | |
135 "\n[a-z] [0-9]\\(\t\t.*\n\\)\\([a-z] [0-9]\\1\\)*[a-z] \\([0-9]\\)\\1" | |
136 nil t) | |
137 (let ((dig1 (char-after (1- (match-beginning 1)))) | |
138 (dig2 (char-after (match-beginning 3)))) | |
139 (delete-region (match-end 1) (match-end 0)) | |
140 (goto-char (match-beginning 1)) | |
141 (delete-backward-char 1) | |
142 (delete-char 1) | |
143 (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) | |
144 (goto-char (point-min))) | |
145 ) | |
146 | |
147 (defun calc-describe-key-briefly (key) | |
148 (interactive "kDescribe key briefly: ") | |
149 (calc-describe-key key t) | |
150 ) | |
151 | |
152 (defun calc-describe-key (key &optional briefly) | |
153 (interactive "kDescribe key: ") | |
154 (let ((defn (if (eq (key-binding key) 'calc-dispatch) | |
155 (let ((key2 (calc-read-key-sequence | |
156 (format "Describe key briefly: %s-" | |
157 (key-description key)) | |
158 calc-dispatch-map))) | |
159 (setq key (concat key key2)) | |
160 (lookup-key calc-dispatch-map key2)) | |
161 (if (eq (key-binding key) 'calc-help-prefix) | |
162 (let ((key2 (calc-read-key-sequence | |
163 (format "Describe key briefly: %s-" | |
164 (key-description key)) | |
165 calc-help-map))) | |
166 (setq key (concat key key2)) | |
167 (lookup-key calc-help-map key2)) | |
168 (key-binding key)))) | |
169 (inv nil) | |
170 (hyp nil)) | |
171 (while (or (equal key "I") (equal key "H")) | |
172 (if (equal key "I") | |
173 (setq inv (not inv)) | |
174 (setq hyp (not hyp))) | |
175 (setq key (read-key-sequence (format "Describe key%s:%s%s " | |
176 (if briefly " briefly" "") | |
177 (if inv " I" "") | |
178 (if hyp " H" ""))) | |
179 defn (key-binding key))) | |
180 (let ((desc (key-description key)) | |
181 target) | |
182 (if (string-match "^ESC " desc) | |
183 (setq desc (concat "M-" (substring desc 4)))) | |
184 (while (string-match "^M-# \\(ESC \\|C-\\)" desc) | |
185 (setq desc (concat "M-# " (substring desc (match-end 0))))) | |
186 (if briefly | |
187 (let ((msg (save-excursion | |
188 (set-buffer (get-buffer-create "*Calc Summary*")) | |
189 (if (= (buffer-size) 0) | |
190 (progn | |
191 (message "Reading Calc summary from manual...") | |
192 (save-window-excursion | |
193 (save-excursion | |
194 (calc-info) | |
195 (Info-goto-node "Summary") | |
196 (goto-char (point-min)) | |
197 (forward-line 1) | |
198 (copy-to-buffer "*Calc Summary*" | |
199 (point) (point-max)) | |
200 (Info-last))) | |
201 (setq case-fold-search nil) | |
202 (re-search-forward "^\\(.*\\)\\[\\.\\. a b") | |
203 (setq calc-summary-indentation | |
204 (- (match-end 1) (match-beginning 1))))) | |
205 (goto-char (point-min)) | |
206 (setq target (if (and (string-match "[0-9]\\'" desc) | |
207 (not (string-match "[d#]" desc))) | |
208 (concat (substring desc 0 -1) "0-9") | |
209 desc)) | |
210 (if (re-search-forward | |
211 (format "\n%s%s%s%s[ a-zA-Z]" | |
212 (make-string (+ calc-summary-indentation 9) | |
213 ?\.) | |
214 (if (string-match "M-#" desc) " " | |
215 (if inv | |
216 (if hyp "I H " " I ") | |
217 (if hyp " H " " "))) | |
218 (regexp-quote target) | |
219 (make-string (max (- 6 (length target)) 0) | |
220 ?\ )) | |
221 nil t) | |
222 (let (pt) | |
223 (beginning-of-line) | |
224 (forward-char calc-summary-indentation) | |
225 (setq pt (point)) | |
226 (end-of-line) | |
227 (buffer-substring pt (point))))))) | |
228 (if msg | |
229 (let ((args (substring msg 0 9)) | |
230 (keys (substring msg 9 19)) | |
231 (prompts (substring msg 19 38)) | |
232 (notes "") | |
233 (cmd (substring msg 40)) | |
234 msg) | |
235 (if (string-match "\\` +" args) | |
236 (setq args (substring args (match-end 0)))) | |
237 (if (string-match " +\\'" args) | |
238 (setq args (substring args 0 (match-beginning 0)))) | |
239 (if (string-match "\\` +" keys) | |
240 (setq keys (substring keys (match-end 0)))) | |
241 (if (string-match " +\\'" keys) | |
242 (setq keys (substring keys 0 (match-beginning 0)))) | |
243 (if (string-match " [0-9,]+\\'" prompts) | |
244 (setq notes (substring prompts (1+ (match-beginning 0))) | |
245 prompts (substring prompts 0 (match-beginning 0)))) | |
246 (if (string-match " +\\'" prompts) | |
247 (setq prompts (substring prompts 0 (match-beginning 0)))) | |
248 (if (string-match "\\` +" prompts) | |
249 (setq prompts (substring prompts (match-end 0)))) | |
250 (setq msg (format | |
251 "%s: %s%s`%s'%s%s %s%s" | |
252 (if (string-match | |
253 "\\`\\(calc-[-a-zA-Z0-9]+\\) *\\(.*\\)\\'" | |
254 cmd) | |
255 (prog1 (math-match-substring cmd 1) | |
256 (setq cmd (math-match-substring cmd 2))) | |
257 defn) | |
258 args (if (equal args "") "" " ") | |
259 keys | |
260 (if (equal prompts "") "" " ") prompts | |
261 (if (equal cmd "") "" " => ") cmd)) | |
262 (message "%s%s%s runs %s%s" | |
263 (if inv "I " "") (if hyp "H " "") desc | |
264 msg | |
265 (if (equal notes "") "" | |
266 (format " (?=notes %s)" notes))) | |
267 (let ((key (calc-read-key t))) | |
268 (if (eq (car key) ??) | |
269 (if (equal notes "") | |
270 (message "No notes for this command") | |
271 (while (string-match "," notes) | |
272 (aset notes (match-beginning 0) ? )) | |
273 (setq notes (sort (car (read-from-string | |
274 (format "(%s)" notes))) | |
275 '<)) | |
276 (with-output-to-temp-buffer "*Help*" | |
277 (princ (format "%s\n\n" msg)) | |
278 (set-buffer "*Calc Summary*") | |
279 (re-search-forward "^ *NOTES") | |
280 (while notes | |
281 (re-search-forward | |
282 (format "^ *%d\\. " (car notes))) | |
283 (beginning-of-line) | |
284 (let ((pt (point))) | |
285 (forward-line 1) | |
286 (or (re-search-forward "^ ? ?[0-9]+\\. " nil t) | |
287 (goto-char (point-max))) | |
288 (beginning-of-line) | |
289 (princ (buffer-substring pt (point)))) | |
290 (setq notes (cdr notes))) | |
291 (print-help-return-message))) | |
292 (calc-unread-command (cdr key))))) | |
293 (if (or (null defn) (integerp defn)) | |
294 (message "%s is undefined" desc) | |
295 (message "%s runs the command %s" | |
296 desc | |
297 (if (symbolp defn) defn (prin1-to-string defn)))))) | |
298 (if inv (setq desc (concat "I " desc))) | |
299 (if hyp (setq desc (concat "H " desc))) | |
300 (calc-describe-thing desc "Key Index" nil | |
301 (string-match "[A-Z][A-Z][A-Z]" desc))))) | |
302 ) | |
303 | |
304 (defun calc-describe-function (&optional func) | |
305 (interactive) | |
306 (or func | |
307 (setq func (intern (completing-read "Describe function: " | |
308 obarray nil t "calcFunc-")))) | |
309 (setq func (symbol-name func)) | |
310 (if (string-match "\\`calc-." func) | |
311 (calc-describe-thing func "Command Index") | |
312 (calc-describe-thing (if (string-match "\\`calcFunc-." func) | |
313 (substring func 9) | |
314 func) | |
315 "Function Index")) | |
316 ) | |
317 | |
318 (defun calc-describe-variable (&optional var) | |
319 (interactive) | |
320 (or var | |
321 (setq var (intern (completing-read "Describe variable: " | |
322 obarray nil t "var-")))) | |
323 (setq var (symbol-name var)) | |
324 (calc-describe-thing var "Variable Index" | |
325 (if (string-match "\\`var-." var) | |
326 (substring var 4) | |
327 var)) | |
328 ) | |
329 | |
330 (defun calc-describe-thing (thing where &optional target not-quoted) | |
331 (message "Looking for `%s' in %s..." thing where) | |
332 (let ((savewin (current-window-configuration))) | |
333 (calc-info) | |
334 (Info-goto-node where) | |
335 (or (let ((case-fold-search nil)) | |
336 (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." | |
337 (regexp-quote thing)) | |
338 nil t)) | |
339 (and (string-match "\\`\\([a-z ]*\\)[0-9]\\'" thing) | |
340 (re-search-forward (format "\n\\* +%s[01]-9: \\(.*\\)\\." | |
341 (substring thing 0 -1)) | |
342 nil t) | |
343 (setq thing (format "%s9" (substring thing 0 -1)))) | |
344 (progn | |
345 (Info-last) | |
346 (set-window-configuration savewin) | |
347 (error "Can't find `%s' in %s" thing where))) | |
348 (let (Info-history) | |
349 (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1)))) | |
350 (or (let ((case-fold-search nil)) | |
351 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
352 (or target thing) | |
353 (or target thing) | |
354 (or target thing)) nil t) | |
355 (and not-quoted | |
356 (let ((case-fold-search t)) | |
357 (search-forward (or target thing) nil t))) | |
358 (search-forward (format "`%s'" (or target thing)) nil t) | |
359 (search-forward (or target thing) nil t))) | |
360 (let ((case-fold-search t)) | |
361 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
362 (or target thing) | |
363 (or target thing) | |
364 (or target thing)) nil t) | |
365 (search-forward (format "`%s'" (or target thing)) nil t) | |
366 (search-forward (or target thing) nil t)))) | |
367 (beginning-of-line) | |
368 (message "Found `%s' in %s" thing where)) | |
369 ) | |
370 | |
371 (defun calc-view-news () | |
372 (interactive) | |
373 (let ((path load-path)) | |
374 (while (and path | |
375 (not (file-exists-p (expand-file-name "calc.el" (car path))))) | |
376 (setq path (cdr path))) | |
377 (or (and path | |
378 (file-exists-p (expand-file-name "README" (car path)))) | |
379 (error "Can't locate Calc sources")) | |
380 (calc-quit) | |
381 (switch-to-buffer "*Help*") | |
382 (erase-buffer) | |
383 (insert-file-contents (expand-file-name "README" (car path))) | |
384 (search-forward "Summary of changes") | |
385 (forward-line -1) | |
386 (delete-region (point-min) (point)) | |
387 (goto-char (point-min))) | |
388 ) | |
389 | |
390 | |
391 | |
392 (defun calc-full-help () | |
393 (interactive) | |
394 (with-output-to-temp-buffer "*Help*" | |
395 (princ (format "GNU Emacs Calculator version %s of %s.\n" | |
396 calc-version calc-version-date)) | |
397 (princ " By Dave Gillespie, daveg@synaptics.com.\n") | |
398 (princ (format " Installed %s.\n" calc-installed-date)) | |
399 (princ " Copyright (C) 1990, 1993 Free Software Foundation, Inc.\n\n") | |
400 (princ "Type `h s' for a more detailed summary.\n") | |
401 (princ "Or type `h i' to read the full Calc manual on-line.\n\n") | |
402 (princ "Basic keys:\n") | |
403 (let* ((calc-full-help-flag t)) | |
404 (mapcar (function (lambda (x) (princ (format " %s\n" x)))) | |
405 (nreverse (cdr (reverse (cdr (calc-help)))))) | |
406 (mapcar (function (lambda (prefix) | |
407 (let ((msgs (condition-case err | |
408 (funcall prefix) | |
409 (error nil)))) | |
410 (if (car msgs) | |
411 (princ | |
412 (if (eq (nth 2 msgs) ?v) | |
413 "\n`v' or `V' prefix (vector/matrix) keys: \n" | |
414 (if (nth 2 msgs) | |
415 (format | |
416 "\n`%c' prefix (%s) keys:\n" | |
417 (nth 2 msgs) | |
418 (or (cdr (assq (nth 2 msgs) | |
419 calc-help-long-names)) | |
420 (nth 1 msgs))) | |
421 (format "\n%s-modified keys:\n" | |
422 (capitalize (nth 1 msgs))))))) | |
423 (mapcar (function (lambda (x) | |
424 (princ (format " %s\n" x)))) | |
425 (car msgs))))) | |
426 '(calc-inverse-prefix-help | |
427 calc-hyperbolic-prefix-help | |
428 calc-inv-hyp-prefix-help | |
429 calc-a-prefix-help | |
430 calc-b-prefix-help | |
431 calc-c-prefix-help | |
432 calc-d-prefix-help | |
433 calc-f-prefix-help | |
434 calc-g-prefix-help | |
435 calc-h-prefix-help | |
436 calc-j-prefix-help | |
437 calc-k-prefix-help | |
438 calc-m-prefix-help | |
439 calc-r-prefix-help | |
440 calc-s-prefix-help | |
441 calc-t-prefix-help | |
442 calc-u-prefix-help | |
443 calc-v-prefix-help | |
444 calc-shift-Y-prefix-help | |
445 calc-shift-Z-prefix-help | |
446 calc-z-prefix-help))) | |
447 (print-help-return-message)) | |
448 ) | |
449 | |
450 (defvar calc-help-long-names '( ( ?b . "binary/business" ) | |
451 ( ?g . "graphics" ) | |
452 ( ?j . "selection" ) | |
453 ( ?k . "combinatorics/statistics" ) | |
454 ( ?u . "units/statistics" ) | |
455 )) | |
456 | |
457 (defun calc-h-prefix-help () | |
458 (interactive) | |
459 (calc-do-prefix-help | |
460 '("Help; Bindings; Info, Tutorial, Summary; News" | |
461 "describe: Key, C (briefly), Function, Variable") | |
462 "help" ?h) | |
463 ) | |
464 | |
465 (defun calc-inverse-prefix-help () | |
466 (interactive) | |
467 (calc-do-prefix-help | |
468 '("I + S (arcsin), C (arccos), T (arctan); Q (square)" | |
469 "I + E (ln), L (exp), B (alog: B^X); f E (lnp1), f L (expm1)" | |
470 "I + F (ceiling), R (truncate); a S (invert func)" | |
471 "I + a m (match-not); c h (from-hms); k n (prev prime)" | |
472 "I + f G (gamma-Q); f e (erfc); k B (etc., lower-tail dists)" | |
473 "I + V S (reverse sort); V G (reverse grade)" | |
474 "I + v s (remove subvec); v h (tail)" | |
475 "I + t + (alt sum), t M (mean with error)" | |
476 "I + t S (pop std dev), t C (pop covar)") | |
477 "inverse" nil) | |
478 ) | |
479 | |
480 (defun calc-hyperbolic-prefix-help () | |
481 (interactive) | |
482 (calc-do-prefix-help | |
483 '("H + S (sinh), C (cosh), T (tanh); E (exp10), L (log10)" | |
484 "H + F (float floor), R (float round); P (constant \"e\")" | |
485 "H + a d (total derivative); k c (permutations)" | |
486 "H + k b (bern-poly), k e (euler-poly); k s (stirling-2)" | |
487 "H + f G (gamma-g), f B (beta-B); v h (rhead), v k (rcons)" | |
488 "H + v e (expand w/filler); V H (weighted histogram)" | |
489 "H + a S (general solve eqn), j I (general isolate)" | |
490 "H + a R (widen/root), a N (widen/min), a X (widen/max)" | |
491 "H + t M (median), t S (variance), t C (correlation coef)" | |
492 "H + c f/F/c (pervasive float/frac/clean)") | |
493 "hyperbolic" nil) | |
494 ) | |
495 | |
496 (defun calc-inv-hyp-prefix-help () | |
497 (interactive) | |
498 (calc-do-prefix-help | |
499 '("I H + S (arcsinh), C (arccosh), T (arctanh)" | |
500 "I H + E (log10), L (exp10); f G (gamma-G)" | |
501 "I H + F (float ceiling), R (float truncate)" | |
502 "I H + t S (pop variance)" | |
503 "I H + a S (general invert func); v h (rtail)") | |
504 "inverse-hyperbolic" nil) | |
505 ) | |
506 | |
507 | |
508 (defun calc-f-prefix-help () | |
509 (interactive) | |
510 (calc-do-prefix-help | |
511 '("miN, maX; Hypot; Im, Re; Sign; [, ] (incr/decr)" | |
512 "Gamma, Beta, Erf, besselJ, besselY" | |
513 "SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2" | |
514 "SHIFT + Abssqr; Mantissa, eXponent, Scale" | |
515 "SHIFT + incomplete: Gamma-P, Beta-I") | |
516 "functions" ?f) | |
517 ) | |
518 | |
519 | |
520 (defun calc-s-prefix-help () | |
521 (interactive) | |
522 (calc-do-prefix-help | |
523 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)" | |
524 "Let; Copy; Declare; Insert, Perm; Edit" | |
525 "Negate, +, -, *, /, ^, &, |, [, ]; Map" | |
526 "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" | |
527 "SHIFT + LineStyles, PointStyles, plotRejects; Units" | |
528 "SHIFT + Eval-, AlgSimp-, ExtSimp-, FitRules") | |
529 "store" ?s) | |
530 ) | |
531 | |
532 (defun calc-r-prefix-help () | |
533 (interactive) | |
534 (calc-do-prefix-help | |
535 '("digits 0-9: recall, same as `s r 0-9'") | |
536 "recall" ?r) | |
537 ) | |
538 | |
539 | |
540 (defun calc-j-prefix-help () | |
541 (interactive) | |
542 (calc-do-prefix-help | |
543 '("Select, Additional, Once; eVal, Formula; Rewrite" | |
544 "More, Less, 1-9, Next, Previous" | |
545 "Unselect, Clear; Display; Enable; Breakable" | |
546 "' (replace), ` (edit), +, -, *, /, RET (grab), DEL" | |
547 "SHIFT + swap: Left, Right; maybe: Select, Once" | |
548 "SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate" | |
549 "SHIFT + Negate, & (invert); Unpack") | |
550 "select" ?j) | |
551 ) | |
552 | |
553 | |
554 (defun calc-a-prefix-help () | |
555 (interactive) | |
556 (calc-do-prefix-help | |
557 '("Simplify, Extended-simplify, eVal; \" (exp-formula)" | |
558 "eXpand, Collect, Factor, Apart, Norm-rat" | |
559 "GCD, /, \\, % (polys); Polint" | |
560 "Derivative, Integral, Taylor; _ (subscr)" | |
561 "suBstitute; Rewrite, Match" | |
562 "SHIFT + Solve; Root, miN, maX; Poly-roots; Fit" | |
563 "SHIFT + Map; Tabulate, + (sum), * (prod); num-Integ" | |
564 "relations: =, # (not =), <, >, [ (< or =), ] (> or =)" | |
565 "logical: & (and), | (or), ! (not); : (if)" | |
566 "misc: { (in-set); . (rmeq)") | |
567 "algebra" ?a) | |
568 ) | |
569 | |
570 | |
571 (defun calc-b-prefix-help () | |
572 (interactive) | |
573 (calc-do-prefix-help | |
574 '("And, Or, Xor, Diff, Not; Wordsize, Clip" | |
575 "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift" | |
576 "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr" | |
577 "SHIFT + business: Sln, sYd, Ddb; %ch") | |
578 "binary/bus" ?b) | |
579 ) | |
580 | |
581 | |
582 (defun calc-c-prefix-help () | |
583 (interactive) | |
584 (calc-do-prefix-help | |
585 '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %" | |
586 "SHIFT + Fraction") | |
587 "convert" ?c) | |
588 ) | |
589 | |
590 | |
591 (defun calc-d-prefix-help () | |
592 (interactive) | |
593 (calc-do-prefix-help | |
594 '("Group, \",\"; Normal, Fix, Sci, Eng, \".\"; Over" | |
595 "Radix, Zeros, 2, 8, 0, 6; Hms; Date; Complex, I, J" | |
596 "Why; Line-nums, line-Breaks; <, =, > (justify); Plain" | |
597 "\" (strings); Truncate, [, ]; SPC (refresh), RET" | |
598 "SHIFT + language: Normal, One-line, Big, Unformatted" | |
599 "SHIFT + language: C, Pascal, Fortran; TeX, Eqn" | |
600 "SHIFT + language: Mathematica, W=Maple") | |
601 "display" ?d) | |
602 ) | |
603 | |
604 | |
605 (defun calc-g-prefix-help () | |
606 (interactive) | |
607 (calc-do-prefix-help | |
608 '("Fast; Add, Delete, Juggle; Plot, Clear; Quit" | |
609 "Header, Name, Grid, Border, Key; View-commands, X-display" | |
610 "x-axis: Range, Title, Log, Zero; lineStyle" | |
611 "SHIFT + y-axis: Range, Title, Log, Zero; pointStyle" | |
612 "SHIFT + Print; Device, Output-file; X-geometry" | |
613 "SHIFT + Num-pts; Command, Kill, View-trail" | |
614 "SHIFT + 3d: Fast, Add; CTRL + z-axis: Range, Title, Log") | |
615 "graph" ?g) | |
616 ) | |
617 | |
618 | |
619 (defun calc-k-prefix-help () | |
620 (interactive) | |
621 (calc-do-prefix-help | |
622 '("GCD, LCM; Choose (binomial), Double-factorial" | |
623 "Random, random-Again, sHuffle" | |
624 "Factors, Prime-test, Next-prime, Totient, Moebius" | |
625 "Bernoulli, Euler, Stirling" | |
626 "SHIFT + Extended-gcd" | |
627 "SHIFT + dists: Binomial, Chi-square, F, Normal" | |
628 "SHIFT + dists: Poisson, student's-T") | |
629 "combinatorics" ?k) | |
630 ) | |
631 | |
632 | |
633 (defun calc-m-prefix-help () | |
634 (interactive) | |
635 (calc-do-prefix-help | |
636 '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat" | |
637 "Working; Xtensions; Mode-save" | |
638 "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" | |
639 "SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units") | |
640 "mode" ?m) | |
641 ) | |
642 | |
643 | |
644 (defun calc-t-prefix-help () | |
645 (interactive) | |
646 (calc-do-prefix-help | |
647 '("Display; Fwd, Back; Next, Prev, Here, [, ]; Yank" | |
648 "Search, Rev; In, Out; <, >; Kill; Marker; . (abbrev)" | |
649 "SHIFT + time: Now; Part; Date, Julian, Unix, Czone" | |
650 "SHIFT + time: newWeek, newMonth, newYear; Incmonth" | |
651 "SHIFT + time: +, - (business days)" | |
652 "digits 0-9: store-to, same as `s t 0-9'") | |
653 "trail/time" ?t) | |
654 ) | |
655 | |
656 | |
657 (defun calc-u-prefix-help () | |
658 (interactive) | |
659 (calc-do-prefix-help | |
660 '("Simplify, Convert, Temperature-convert, Base-units" | |
661 "Autorange; Remove, eXtract; Explain; View-table; 0-9" | |
662 "Define, Undefine, Get-defn, Permanent" | |
663 "SHIFT + View-table-other-window" | |
664 "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" | |
665 "SHIFT + stat: + (sum), - (asum), * (prod), # (count)") | |
666 "units/stat" ?u) | |
667 ) | |
668 | |
669 | |
670 (defun calc-v-prefix-help () | |
671 (interactive) | |
672 (calc-do-prefix-help | |
673 '("Pack, Unpack, Identity, Diagonal, indeX, Build" | |
674 "Row, Column, Subvector; Length; Find; Mask, Expand" | |
675 "Tranpose, Arrange, reVerse; Head, Kons; rNorm" | |
676 "SHIFT + Det, & (inverse), LUD, Trace, conJtrn, Cross" | |
677 "SHIFT + Sort, Grade, Histogram; cNorm" | |
678 "SHIFT + Apply, Map, Reduce, accUm, Inner-, Outer-prod" | |
679 "SHIFT + sets: V (union), ^ (intersection), - (diff)" | |
680 "SHIFT + sets: Xor, ~ (complement), Floor, Enum" | |
681 "SHIFT + sets: : (span), # (card), + (rdup)" | |
682 "<, =, > (justification); , (commas); [, {, ( (brackets)" | |
683 "} (matrix brackets); . (abbreviate); / (multi-lines)") | |
684 "vec/mat" ?v) | |
685 ) | |
686 |