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