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