Fix Bug#20637. Do not merge to master
[emacs.git] / lisp / calc / calc-help.el
blob58a927306aec717bfb5635f4c6608e0e8650a567
1 ;;; calc-help.el --- help display functions for Calc,
3 ;; Copyright (C) 1990-1993, 2001-2016 Free Software Foundation, Inc.
5 ;; Author: David Gillespie <daveg@synaptics.com>
7 ;; This file is part of GNU Emacs.
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 of the License, or
12 ;; (at your option) any later version.
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.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 ;;; Commentary:
24 ;;; Code:
26 ;; This file is autoloaded from calc-ext.el.
28 (require 'calc-ext)
29 (require 'calc-macs)
31 ;; Declare functions which are defined elsewhere.
32 (declare-function Info-goto-node "info" (nodename &optional fork strict-case))
33 (declare-function Info-last "info" ())
36 (defun calc-help-prefix (arg)
37 "This key is the prefix for Calc help functions. See calc-help-for-help."
38 (interactive "P")
39 (or calc-dispatch-help (sit-for echo-keystrokes))
40 (let ((key (calc-read-key-sequence
41 (if calc-dispatch-help
42 "Calc Help options: Help, Info, Tutorial, Summary; Key, Function; ?=more"
43 (format "%s (Type ? for a list of Calc Help options)"
44 (key-description (this-command-keys))))
45 calc-help-map)))
46 (setq key (lookup-key calc-help-map key))
47 (message "")
48 (if key
49 (call-interactively key)
50 (beep))))
52 (defun calc-help-for-help (arg)
53 "You have typed `h', the Calc help character. Type a Help option:
55 B calc-describe-bindings. Display a table of all key bindings.
56 H calc-full-help. Display all `?' key messages at once.
58 I calc-info. Read the Calc manual using the Info system.
59 T calc-tutorial. Read the Calc tutorial using the Info system.
60 S calc-info-summary. Read the Calc summary using the Info system.
62 C calc-describe-key-briefly. Look up the command name for a given key.
63 K calc-describe-key. Look up a key's documentation in the manual.
64 F calc-describe-function. Look up a function's documentation in the manual.
65 V calc-describe-variable. Look up a variable's documentation in the manual.
67 N calc-view-news. Display Calc history of changes.
69 C-c Describe conditions for copying Calc.
70 C-d Describe how you can get a new copy of Calc or report a bug.
71 C-w Describe how there is no warranty for Calc."
72 (interactive "P")
73 (if calc-dispatch-help
74 (let (key)
75 (save-window-excursion
76 (describe-function 'calc-help-for-help)
77 (select-window (get-buffer-window "*Help*"))
78 (while (progn
79 (message "Calc Help options: Help, Info, ... press SPC, DEL to scroll, C-g to cancel")
80 (memq (car (setq key (calc-read-key t)))
81 '(? ?\C-h ?\C-? ?\C-v ?\M-v)))
82 (condition-case err
83 (if (memq (car key) '(? ?\C-v))
84 (scroll-up)
85 (scroll-down))
86 (error (beep)))))
87 (calc-unread-command (cdr key))
88 (calc-help-prefix nil))
89 (let ((calc-dispatch-help t))
90 (calc-help-prefix arg))))
92 (defun calc-describe-copying ()
93 (interactive)
94 (calc-info-goto-node "Copying"))
96 (defun calc-describe-distribution ()
97 (interactive)
98 (calc-info-goto-node "Reporting Bugs"))
100 (defun calc-describe-no-warranty ()
101 (interactive)
102 (calc-info-goto-node "Copying")
103 (let ((case-fold-search nil))
104 (search-forward " NO WARRANTY"))
105 (beginning-of-line)
106 (recenter 0))
108 (defun calc-describe-bindings ()
109 (interactive)
110 (describe-bindings)
111 (with-current-buffer "*Help*"
112 (let ((inhibit-read-only t))
113 (goto-char (point-min))
114 (when (search-forward "Major Mode Bindings:" nil t)
115 (delete-region (point-min) (point))
116 (insert "Calc Mode Bindings:"))
117 (when (search-forward "Global bindings:" nil t)
118 (forward-line -1)
119 (delete-region (point) (point-max)))
120 (goto-char (point-min))
121 (while
122 (re-search-forward
123 "\n[a-z] [0-9]\\( .*\n\\)\\([a-z] [0-9]\\1\\)*[a-z] \\([0-9]\\)\\1"
124 nil t)
125 (let ((dig1 (char-after (1- (match-beginning 1))))
126 (dig2 (char-after (match-beginning 3))))
127 (delete-region (match-end 1) (match-end 0))
128 (goto-char (match-beginning 1))
129 (delete-char -1)
130 (delete-char 5)
131 (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2)))))
132 (goto-char (point-min)))))
134 (defun calc-describe-key-briefly (key)
135 (interactive "kDescribe key briefly: ")
136 (calc-describe-key key t))
138 (defvar Info-history)
140 (defun calc-describe-key (key &optional briefly)
141 (interactive "kDescribe key: ")
142 (let ((defn (if (eq (key-binding key) 'calc-dispatch)
143 (let ((key2 (calc-read-key-sequence
144 (format "Describe key briefly: %s-"
145 (key-description key))
146 calc-dispatch-map)))
147 (setq key (concat key key2))
148 (lookup-key calc-dispatch-map key2))
149 (if (eq (key-binding key) 'calc-help-prefix)
150 (let ((key2 (calc-read-key-sequence
151 (format "Describe key briefly: %s-"
152 (key-description key))
153 calc-help-map)))
154 (setq key (concat key key2))
155 (lookup-key calc-help-map key2))
156 (key-binding key))))
157 (inv nil)
158 (hyp nil)
159 calc-summary-indentation)
160 (while (or (equal key "I") (equal key "H"))
161 (if (equal key "I")
162 (setq inv (not inv))
163 (setq hyp (not hyp)))
164 (setq key (read-key-sequence (format "Describe key%s:%s%s "
165 (if briefly " briefly" "")
166 (if inv " I" "")
167 (if hyp " H" "")))
168 defn (key-binding key)))
169 (let ((desc (key-description key))
170 target)
171 (if (string-match "^ESC " desc)
172 (setq desc (concat "M-" (substring desc 4))))
173 (while (string-match "^M-# \\(ESC \\|C-\\)" desc)
174 (setq desc (concat "M-# " (substring desc (match-end 0)))))
175 (if (string-match "\\(DEL\\|\\LFD\\|RET\\|SPC\\|TAB\\)" desc)
176 (setq desc (replace-match "<\\&>" nil nil desc)))
177 (if briefly
178 (let ((msg (with-current-buffer (get-buffer-create "*Calc Summary*")
179 (if (= (buffer-size) 0)
180 (progn
181 (message "Reading Calc summary from manual...")
182 (require 'info nil t)
183 (with-temp-buffer
184 (Info-mode)
185 (Info-goto-node "(Calc)Summary")
186 (goto-char (point-min))
187 (forward-line 1)
188 (copy-to-buffer "*Calc Summary*"
189 (point) (point-max)))
190 (setq buffer-read-only t)))
191 (goto-char (point-min))
192 (setq case-fold-search nil)
193 (re-search-forward "^\\(.*\\)\\[\\.\\. a b")
194 (setq calc-summary-indentation
195 (- (match-end 1) (match-beginning 1)))
196 (goto-char (point-min))
197 (setq target (if (and (string-match "[0-9]\\'" desc)
198 (not (string-match "[d#]" desc)))
199 (concat (substring desc 0 -1) "0-9")
200 desc))
201 (if (re-search-forward
202 (format "\n%s%s%s%s[ a-zA-Z]"
203 (make-string (+ calc-summary-indentation 9)
204 ?\.)
205 (if (string-match "M-#" desc) " "
206 (if inv
207 (if hyp "I H " " I ")
208 (if hyp " H " " ")))
209 (regexp-quote target)
210 (make-string (max (- 6 (length target)) 0)
211 ?\ ))
212 nil t)
213 (let (pt)
214 (beginning-of-line)
215 (forward-char calc-summary-indentation)
216 (setq pt (point))
217 (end-of-line)
218 (buffer-substring pt (point)))))))
219 (if msg
220 (let ((args (substring msg 0 9))
221 (keys (substring msg 9 19))
222 (prompts (substring msg 19 38))
223 (notes "")
224 (cmd (substring msg 40))
225 msg)
226 (if (string-match "\\` +" args)
227 (setq args (substring args (match-end 0))))
228 (if (string-match " +\\'" args)
229 (setq args (substring args 0 (match-beginning 0))))
230 (if (string-match "\\` +" keys)
231 (setq keys (substring keys (match-end 0))))
232 (if (string-match " +\\'" keys)
233 (setq keys (substring keys 0 (match-beginning 0))))
234 (if (string-match " [0-9,]+\\'" prompts)
235 (setq notes (substring prompts (1+ (match-beginning 0)))
236 prompts (substring prompts 0 (match-beginning 0))))
237 (if (string-match " +\\'" prompts)
238 (setq prompts (substring prompts 0 (match-beginning 0))))
239 (if (string-match "\\` +" prompts)
240 (setq prompts (substring prompts (match-end 0))))
241 (setq msg (format-message
242 "%s: %s%s`%s'%s%s %s%s"
243 (if (string-match
244 "\\`\\(calc-[-a-zA-Z0-9]+\\) *\\(.*\\)\\'"
245 cmd)
246 (prog1 (math-match-substring cmd 1)
247 (setq cmd (math-match-substring cmd 2)))
248 defn)
249 args (if (equal args "") "" " ")
250 keys
251 (if (equal prompts "") "" " ") prompts
252 (if (equal cmd "") "" " => ") cmd))
253 (message "%s%s%s runs %s%s"
254 (if inv "I " "") (if hyp "H " "") desc
256 (if (equal notes "") ""
257 (format " (?=notes %s)" notes)))
258 (let ((key (calc-read-key t)))
259 (if (eq (car key) ??)
260 (if (equal notes "")
261 (message "No notes for this command")
262 (while (string-match "," notes)
263 (aset notes (match-beginning 0) ? ))
264 (setq notes (sort (car (read-from-string
265 (format "(%s)" notes)))
266 '<))
267 (with-output-to-temp-buffer "*Help*"
268 (princ (format "%s\n\n" msg))
269 (set-buffer "*Calc Summary*")
270 (re-search-forward "^ *NOTES")
271 (while notes
272 (re-search-forward
273 (format "^ *%d\\. " (car notes)))
274 (beginning-of-line)
275 (let ((pt (point)))
276 (forward-line 1)
277 (or (re-search-forward "^ ? ?[0-9]+\\. " nil t)
278 (goto-char (point-max)))
279 (beginning-of-line)
280 (princ (buffer-substring pt (point))))
281 (setq notes (cdr notes)))
282 (help-print-return-message)))
283 (calc-unread-command (cdr key)))))
284 (if (or (null defn) (integerp defn))
285 (message "%s is undefined" desc)
286 (message "%s runs the command %s"
287 desc
288 (if (symbolp defn) defn (prin1-to-string defn))))))
289 (if inv (setq desc (concat "I " desc)))
290 (if hyp (setq desc (concat "H " desc)))
291 (calc-describe-thing desc "Key Index" nil
292 (string-match "[A-Z][A-Z][A-Z]" desc))))))
294 (defvar calc-help-function-list nil
295 "List of functions provided by Calc.")
297 (defvar calc-help-variable-list nil
298 "List of variables provided by Calc.")
300 (defun calc-help-index-entries (&rest indices)
301 "Create a list of entries from the INDICES in the Calc info manual."
302 (let ((entrylist '())
303 entry)
304 (require 'info nil t)
305 (while indices
306 (condition-case nil
307 (with-temp-buffer
308 (Info-mode)
309 (Info-goto-node (concat "(Calc)" (car indices) " Index"))
310 (goto-char (point-min))
311 (while (re-search-forward "\n\\* \\(.*\\): " nil t)
312 (setq entry (match-string 1))
313 (if (and (not (string-match "<[1-9]+>" entry))
314 (not (string-match "(.*)" entry))
315 (not (string= entry "Menu")))
316 (unless (assoc entry entrylist)
317 (setq entrylist (cons entry entrylist))))))
318 (error nil))
319 (setq indices (cdr indices)))
320 entrylist))
322 (defun calc-describe-function (&optional func)
323 (interactive)
324 (unless calc-help-function-list
325 (setq calc-help-function-list
326 (calc-help-index-entries "Function" "Command")))
327 (or func
328 (setq func (completing-read "Describe function: "
329 calc-help-function-list
330 nil t)))
331 (if (string-match "\\`calc-." func)
332 (calc-describe-thing func "Command Index")
333 (calc-describe-thing func "Function Index")))
335 (defun calc-describe-variable (&optional var)
336 (interactive)
337 (unless calc-help-variable-list
338 (setq calc-help-variable-list
339 (calc-help-index-entries "Variable")))
340 (or var
341 (setq var (completing-read "Describe variable: "
342 calc-help-variable-list
343 nil t)))
344 (calc-describe-thing var "Variable Index"))
346 (defun calc-describe-thing (thing where &optional target not-quoted)
347 (message "Looking for `%s' in %s..." thing where)
348 (let ((savewin (current-window-configuration)))
349 (calc-info-goto-node where)
350 (or (let ((case-fold-search nil))
351 (re-search-forward (format "\n\\* +%s: \\(.*\\)\\."
352 (regexp-quote thing))
353 nil t))
354 (and (string-match "\\`\\([a-z ]*\\)[0-9]\\'" thing)
355 (re-search-forward (format "\n\\* +%s[01]-9: \\(.*\\)\\."
356 (substring thing 0 -1))
357 nil t)
358 (setq thing (format "%s9" (substring thing 0 -1))))
359 (progn
360 (if Info-history
361 (Info-last))
362 (set-window-configuration savewin)
363 (error "Can't find `%s' in %s" thing where)))
364 (let (Info-history)
365 (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
366 (let* ((string-target (or target thing))
367 (quoted (format "['`‘]%s['’]" (regexp-quote string-target)))
368 (bracketed (format "\\[%s\\]\\|(%s)\\|\\<The[ \n]%s"
369 quoted quoted quoted)))
370 (or (let ((case-fold-search nil))
371 (or (re-search-forward bracketed nil t)
372 (and not-quoted
373 (let ((case-fold-search t))
374 (search-forward string-target nil t)))
375 (re-search-forward quoted nil t)
376 (search-forward string-target nil t)))
377 (let ((case-fold-search t))
378 (or (re-search-forward bracketed nil t)
379 (re-search-forward quoted nil t)
380 (search-forward string-target nil t)))))
381 (beginning-of-line)
382 (message "Found `%s' in %s" thing where)))
384 (defun calc-view-news ()
385 (interactive)
386 (calc-quit)
387 (view-emacs-news)
388 (re-search-forward "^\\*+ .*\\<Calc\\>" nil t))
390 (defvar calc-help-long-names '((?b . "binary/business")
391 (?g . "graphics")
392 (?j . "selection")
393 (?k . "combinatorics/statistics")
394 (?u . "units/statistics")))
396 (defun calc-full-help ()
397 (interactive)
398 (with-output-to-temp-buffer "*Help*"
399 (princ "GNU Emacs Calculator.\n")
400 (princ " By Dave Gillespie.\n")
401 (princ (format " %s\n\n" emacs-copyright))
402 (princ (format-message "Type `h s' for a more detailed summary.\n"))
403 (princ (format-message
404 "Or type `h i' to read the full Calc manual on-line.\n\n"))
405 (princ "Basic keys:\n")
406 (let* ((calc-full-help-flag t))
407 (mapc (function (lambda (x) (princ (format
408 " %s\n"
409 (substitute-command-keys x)))))
410 (nreverse (cdr (reverse (cdr (calc-help))))))
411 (mapc (function (lambda (prefix)
412 (let ((msgs (condition-case err
413 (funcall prefix)
414 (error nil))))
415 (if (car msgs)
416 (princ
417 (if (eq (nth 2 msgs) ?v)
418 (format-message
419 "\n`v' or `V' prefix (vector/matrix) keys: \n")
420 (if (nth 2 msgs)
421 (format-message
422 "\n`%c' prefix (%s) keys:\n"
423 (nth 2 msgs)
424 (or (cdr (assq (nth 2 msgs)
425 calc-help-long-names))
426 (nth 1 msgs)))
427 (format "\n%s-modified keys:\n"
428 (capitalize (nth 1 msgs)))))))
429 (mapcar (function
430 (lambda (x)
431 (princ (format
432 " %s\n"
433 (substitute-command-keys x)))))
434 (car msgs)))))
435 '(calc-inverse-prefix-help
436 calc-hyperbolic-prefix-help
437 calc-inv-hyp-prefix-help
438 calc-option-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-l-prefix-help
449 calc-m-prefix-help
450 calc-r-prefix-help
451 calc-s-prefix-help
452 calc-t-prefix-help
453 calc-u-prefix-help
454 calc-v-prefix-help
455 calc-shift-Y-prefix-help
456 calc-shift-Z-prefix-help
457 calc-z-prefix-help)))
458 (help-print-return-message)))
460 (defun calc-h-prefix-help ()
461 (interactive)
462 (calc-do-prefix-help
463 '("Help; Bindings; Info, Tutorial, Summary; News"
464 "describe: Key, C (briefly), Function, Variable")
465 "help" ?h))
467 (defun calc-inverse-prefix-help ()
468 (interactive)
469 (calc-do-prefix-help
470 '("I + S (arcsin), C (arccos), T (arctan); Q (square)"
471 "I + E (ln), L (exp), B (alog: B^X); f E (lnp1), f L (expm1)"
472 "I + F (ceiling), R (truncate); a S (invert func)"
473 "I + a m (match-not); c h (from-hms); k n (prev prime)"
474 "I + f G (gamma-Q); f e (erfc); k B (etc., lower-tail dists)"
475 "I + V S (reverse sort); V G (reverse grade)"
476 "I + v s (remove subvec); v h (tail)"
477 "I + t + (alt sum), t M (mean with error)"
478 "I + t S (pop std dev), t C (pop covar)")
479 "inverse" nil))
481 (defun calc-hyperbolic-prefix-help ()
482 (interactive)
483 (calc-do-prefix-help
484 '("H + S (sinh), C (cosh), T (tanh); E (exp10), L (log10)"
485 "H + F (float floor), R (float round); P (constant \"e\")"
486 "H + a d (total derivative); k c (permutations)"
487 "H + k b (bern-poly), k e (euler-poly); k s (stirling-2)"
488 "H + f G (gamma-g), f B (beta-B); v h (rhead), v k (rcons)"
489 "H + v e (expand w/filler); V H (weighted histogram)"
490 "H + a S (general solve eqn), j I (general isolate)"
491 "H + a R (widen/root), a N (widen/min), a X (widen/max)"
492 "H + t M (median), t S (variance), t C (correlation coef)"
493 "H + c f/F/c (pervasive float/frac/clean)")
494 "hyperbolic" nil))
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))
506 (defun calc-option-prefix-help ()
507 (interactive)
508 (calc-do-prefix-help
509 '("")
510 "option" nil))
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")
520 "functions" ?f))
523 (defun calc-s-prefix-help ()
524 (interactive)
525 (calc-do-prefix-help
526 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)"
527 "Let; Copy, K=copy constant; 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")
532 "store" ?s))
534 (defun calc-r-prefix-help ()
535 (interactive)
536 (calc-do-prefix-help
537 '("digits 0-9: recall, same as `s r 0-9'"
538 "Save to register, Insert from register")
539 "recall/register" ?r))
542 (defun calc-j-prefix-help ()
543 (interactive)
544 (calc-do-prefix-help
545 '("Select, Additional, Once; eVal, Formula; Rewrite"
546 "More, Less, 1-9, Next, Previous"
547 "Unselect, Clear; Display; Enable; Breakable"
548 "\\=' (replace), \\=` (edit), +, -, *, /, RET (grab), DEL"
549 "SHIFT + swap: Left, Right; maybe: Select, Once"
550 "SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate"
551 "SHIFT + Negate, & (invert); Unpack")
552 "select" ?j))
555 (defun calc-a-prefix-help ()
556 (interactive)
557 (calc-do-prefix-help
558 '("Simplify, Extended-simplify, eVal; \" (exp-formula)"
559 "eXpand, Collect, Factor, Apart, Norm-rat"
560 "GCD, /, \\, % (polys); Polint"
561 "Derivative, Integral, Taylor; _ (subscr)"
562 "suBstitute; Rewrite, Match"
563 "SHIFT + Solve; Root, miN, maX; Poly-roots; Fit"
564 "SHIFT + Map; Tabulate, + (sum), * (prod); num-Integ"
565 "relations: =, # (not =), <, >, [ (< or =), ] (> or =)"
566 "logical: & (and), | (or), ! (not); : (if)"
567 "misc: { (in-set); . (rmeq)")
568 "algebra" ?a))
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))
581 (defun calc-c-prefix-help ()
582 (interactive)
583 (calc-do-prefix-help
584 '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %"
585 "SHIFT + Fraction")
586 "convert" ?c))
589 (defun calc-d-prefix-help ()
590 (interactive)
591 (calc-do-prefix-help
592 '("Group, \",\"; Normal, Fix, Sci, Eng, \".\"; Over"
593 "Radix, Zeros, 2, 8, 0, 6; Hms; Date; Complex, I, J"
594 "Why; Line-nums, line-Breaks; <, =, > (justify); Plain"
595 "\" (strings); Truncate, [, ]; SPC (refresh), RET, @"
596 "SHIFT + language: Normal, One-line, Big, Unformatted"
597 "SHIFT + language: C, Pascal, Fortran; TeX, LaTeX, Eqn"
598 "SHIFT + language: Yacas, X=Maxima, A=Giac"
599 "SHIFT + language: Mathematica, W=Maple")
600 "display" ?d))
603 (defun calc-g-prefix-help ()
604 (interactive)
605 (calc-do-prefix-help
606 '("Fast; Add, Delete, Juggle; Plot, Clear; Quit"
607 "Header, Name, Grid, Border, Key; View-commands, X-display"
608 "x-axis: Range, Title, Log, Zero; lineStyle"
609 "SHIFT + y-axis: Range, Title, Log, Zero; pointStyle"
610 "SHIFT + Print; Device, Output-file; X-geometry"
611 "SHIFT + Num-pts; Command, Kill, View-trail"
612 "SHIFT + 3d: Fast, Add; CTRL + z-axis: Range, Title, Log")
613 "graph" ?g))
616 (defun calc-k-prefix-help ()
617 (interactive)
618 (calc-do-prefix-help
619 '("GCD, LCM; Choose (binomial), Double-factorial"
620 "Random, random-Again, sHuffle"
621 "Factors, Prime-test, Next-prime, Totient, Moebius"
622 "Bernoulli, Euler, Stirling"
623 "SHIFT + Extended-gcd"
624 "SHIFT + dists: Binomial, Chi-square, F, Normal"
625 "SHIFT + dists: Poisson, student's-T")
626 "combinatorics" ?k))
629 (defun calc-m-prefix-help ()
630 (interactive)
631 (calc-do-prefix-help
632 '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat"
633 "Working; Xtensions; Mode-save; preserve Embedded modes"
634 "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute"
635 "SHIFT + simplify: Off, Num, basIc, Algebraic, Bin, Ext, Units")
636 "mode" ?m))
639 (defun calc-t-prefix-help ()
640 (interactive)
641 (calc-do-prefix-help
642 '("Display; Fwd, Back; Next, Prev, Here, [, ]; Yank"
643 "Search, Rev; In, Out; <, >; Kill; Marker; . (abbrev)"
644 "SHIFT + time: Now; Part; Date, Julian, Unix, Czone"
645 "SHIFT + time: newWeek, newMonth, newYear; Incmonth"
646 "SHIFT + time: +, - (business days)"
647 "digits 0-9: store-to, same as `s t 0-9'")
648 "trail/time" ?t))
651 (defun calc-u-prefix-help ()
652 (interactive)
653 (calc-do-prefix-help
654 '("Simplify, Convert, coNvert exact, Temperature-convert, Base-units"
655 "Autorange; Remove, eXtract; Explain; View-table; 0-9"
656 "Define, Undefine, Get-defn, Permanent"
657 "SHIFT + View-table-other-window"
658 "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN"
659 "SHIFT + stat: + (sum), - (asum), * (prod), # (count)")
660 "units/stat" ?u))
662 (defun calc-l-prefix-help ()
663 (interactive)
664 (calc-do-prefix-help
665 '("Quantity, DB level, Np level"
666 "+, -, *, /"
667 "Scientific pitch notation, Midi number, Frequency"
669 "log units" ?l))
671 (defun calc-v-prefix-help ()
672 (interactive)
673 (calc-do-prefix-help
674 '("Pack, Unpack, Identity, Diagonal, indeX, Build"
675 "Row, Column, Subvector; Length; Find; Mask, Expand"
676 "Transpose, Arrange, reVerse; Head, Kons; rNorm"
677 "SHIFT + Det, & (inverse), LUD, Trace, conJtrn, Cross"
678 "SHIFT + Sort, Grade, Histogram; cNorm"
679 "SHIFT + Apply, Map, Reduce, accUm, Inner-, Outer-prod"
680 "SHIFT + sets: V (union), ^ (intersection), - (diff)"
681 "SHIFT + sets: Xor, ~ (complement), Floor, Enum"
682 "SHIFT + sets: : (span), # (card), + (rdup)"
683 "<, =, > (justification); , (commas); [, {, ( (brackets)"
684 "} (matrix brackets); . (abbreviate); / (multi-lines)")
685 "vec/mat" ?v))
687 (provide 'calc-help)
689 ;;; calc-help.el ends here