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