Calc -- Build / compile warning and error clean up.
[packages] / xemacs-packages / calc / calc-help.el
1 ;;; calc-help.el --- help display functions for Calc,
2
3 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
4
5 ;; Author: David Gillespie <daveg@synaptics.com>
6
7 ;; This file is part of GNU Emacs.
8
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.
13
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.
18
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/>.
21
22 ;;; Commentary:
23
24 ;;; Code:
25
26 ;; This file is autoloaded from calc-ext.el.
27
28 (require 'calc-ext)
29 (require 'calc-macs)
30 (autoload 'Info-mode "info")
31 (autoload 'Info-last "info" nil t)
32
33 (defun calc-help-prefix (arg)
34   "This key is the prefix for Calc help functions.  See calc-help-for-help."
35   (interactive "P")
36   (or calc-dispatch-help (sit-for echo-keystrokes))
37   (let ((key 
38          (calc-read-key-sequence
39           (if calc-dispatch-help
40               "Calc Help options: Help, Info, Tutorial, Summary; Key, Function; ?=more"
41             (format "%s  (Type ? for a list of Calc Help options)"
42                     (key-description (this-command-keys))))
43           calc-help-map)))
44     (setq key (lookup-key calc-help-map key))
45     (message "")
46     (if key
47         (call-interactively key)
48       (beep))))
49
50 (defun calc-help-for-help (arg)
51   "You have typed `h', the Calc help character.  Type a Help option:
52
53 B  calc-describe-bindings.  Display a table of all key bindings.
54 H  calc-full-help.  Display all `?' key messages at once.
55
56 I  calc-info.  Read the Calc manual using the Info system.
57 T  calc-tutorial.  Read the Calc tutorial using the Info system.
58 S  calc-info-summary.  Read the Calc summary using the Info system.
59
60 C  calc-describe-key-briefly.  Look up the command name for a given key.
61 K  calc-describe-key.  Look up a key's documentation in the manual.
62 F  calc-describe-function.  Look up a function's documentation in the manual.
63 V  calc-describe-variable.  Look up a variable's documentation in the manual.
64
65 C-c  Describe conditions for copying Calc.
66 C-d  Describe how you can get a new copy of Calc or report a bug.
67 C-w  Describe how there is no warranty for Calc."
68   (interactive "P")
69   (if calc-dispatch-help
70       (let (key)
71         (save-window-excursion
72           (describe-function 'calc-help-for-help)
73 ;         (select-window (get-buffer-window "*Help*"))
74           (while 
75               (progn
76                 (message 
77                  "Calc Help options: Help, Info, ...  press SPC, DEL to scroll, C-g to cancel")
78                    (memq (car (setq key (calc-read-key t)))
79                          '(?  ?\C-h ?\C-? ?\C-v ?\M-v)))
80             (condition-case nil
81                 (if (memq (car key) '(?  ?\C-v))
82                     (scroll-up)
83                   (scroll-down))
84               (error (beep)))))
85         (calc-unread-command (cdr key))
86         (calc-help-prefix nil))
87     (let ((calc-dispatch-help t))
88       (calc-help-prefix arg))))
89
90 (defun calc-describe-copying ()
91   (interactive)
92   (calc-info-goto-node "Copying"))
93
94 (defun calc-describe-no-warranty ()
95   (interactive)
96   (calc-info-goto-node "Copying")
97   (let ((case-fold-search nil))
98     (search-forward "Disclaimer of Warranty"))
99   (beginning-of-line)
100   (recenter 0))
101
102 (defun calc-describe-bindings ()
103   (interactive)
104   (describe-bindings)
105   (with-current-buffer "*Help*"
106     (let ((inhibit-read-only t))
107       (goto-char (point-min))
108       (when (search-forward "Major Mode Bindings:" nil t)
109         (delete-region (point-min) (point))
110         (insert "Calc Mode Bindings:"))
111       (when (search-forward "Global bindings:" nil t)
112         (forward-line -1)
113         (delete-region (point) (point-max)))
114       (goto-char (point-min))
115       (while
116           (re-search-forward
117            "\n[a-z] [0-9]\\( .*\n\\)\\([a-z] [0-9]\\1\\)*[a-z] \\([0-9]\\)\\1"
118            nil t)
119         (let ((dig1 (char-after (1- (match-beginning 1))))
120               (dig2 (char-after (match-beginning 3))))
121           (delete-region (match-end 1) (match-end 0))
122           (goto-char (match-beginning 1))
123           (delete-char -1)
124           (delete-char 5)
125           (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2)))))
126       (goto-char (point-min)))))
127
128 (defun calc-describe-key-briefly (key)
129   (interactive "kDescribe key briefly: ")
130   (calc-describe-key key t))
131
132 (defvar Info-history)
133
134 (defun calc-describe-key (key &optional briefly)
135   (interactive "kDescribe key: ")
136   (let ((defn (if (eq (key-binding key) 'calc-dispatch)
137                   (let ((key2 (calc-read-key-sequence
138                                (format "Describe key briefly: %s-"
139                                        (key-description key))
140                                calc-dispatch-map)))
141                     (setq key 
142                           (concat (key-description key)
143                           (key-description key2)))
144                     (lookup-key calc-dispatch-map key2))
145                 (if (eq (key-binding key) 'calc-help-prefix)
146                     (let ((key2 (calc-read-key-sequence
147                                  (format "Describe key briefly: %s-"
148                                          (key-description key))
149                                  calc-help-map)))
150                     (setq key 
151                           (concat (key-description key)
152                           (key-description key2)))
153                       (lookup-key calc-help-map key2))
154                   (key-binding key))))
155         (inv nil)
156         (hyp nil)
157         calc-summary-indentation)
158     (while (or (equal (key-description key) "I") 
159                (equal (key-description key) "H"))
160       (if (equal (key-description key) "I")
161           (setq inv (not inv))
162         (setq hyp (not hyp)))
163       (setq key (read-key-sequence (format "Describe key%s:%s%s "
164                                            (if briefly " briefly" "")
165                                            (if inv " I" "")
166                                            (if hyp " H" "")))
167             defn (key-binding key)))
168     (let ((desc (key-description key))
169           target)
170       (if (string-match "^ESC " desc)
171           (setq desc (concat "M-" (substring desc 4))))
172       (while (string-match "^M-# \\(ESC \\|C-\\)" desc)
173         (setq desc (concat "M-# " (substring desc (match-end 0)))))
174 ;      (if (string-match "\\(DEL\\|\\LFD\\|RET\\|SPC\\|TAB\\)" desc)
175 ;          (setq desc (replace-match "<\\&>" nil nil desc)))
176       (if briefly
177           (let ((msg (with-current-buffer (get-buffer-create "*Calc Summary*")
178                        (if (= (buffer-size) 0)
179                            (progn
180                              (message "Reading Calc summary from manual...")
181                              (require 'info nil)
182                              (with-temp-buffer
183                                (Info-mode)
184                                (Info-goto-node "(Calc)Summary")
185                                (goto-char (point-min))
186                                (forward-line 1)
187                                (copy-to-buffer "*Calc Summary*"
188                                                (point) (point-max)))
189                              (setq buffer-read-only t)))
190                        (goto-char (point-min))
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
291                              (string-match "[A-Z][A-Z][A-Z]" desc))))))
292
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)
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 (list entry) entrylist))))))
317         (error nil))
318       (setq indices (cdr indices)))
319     entrylist))
320
321 (defun calc-describe-function (&optional func)
322   (interactive)
323   (unless calc-help-function-list
324     (setq calc-help-function-list
325           (calc-help-index-entries "Function" "Command")))
326   (or func
327       (setq func (completing-read "Describe function: "
328                                   calc-help-function-list
329                                   nil t)))
330   (if (string-match "\\`calc-." func)
331       (calc-describe-thing func "Command Index")
332     (calc-describe-thing func "Function Index")))
333
334 (defun calc-describe-variable (&optional var)
335   (interactive)
336   (unless calc-help-variable-list
337     (setq calc-help-variable-list
338           (calc-help-index-entries "Variable")))
339   (or var
340       (setq var (completing-read "Describe variable: "
341                                  calc-help-variable-list
342                                  nil t)))
343   (calc-describe-thing var "Variable Index"))
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)))
348     (calc-info-goto-node where)
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
359           (if Info-history
360               (Info-last))
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     (let* ((string-target (or target thing))
366            (quoted (format "['`‘]%s['’]" (regexp-quote string-target)))
367            (bracketed (format "\\[%s\\]\\|(%s)\\|\\<The[ \n]%s"
368                               quoted quoted quoted)))
369       (or (let ((case-fold-search nil))
370             (or (re-search-forward bracketed nil t)
371                 (and not-quoted
372                      (let ((case-fold-search t))
373                        (search-forward string-target nil t)))
374                 (re-search-forward quoted nil t)
375                 (search-forward string-target nil t)))
376           (let ((case-fold-search t))
377             (or (re-search-forward bracketed nil t)
378                 (re-search-forward quoted nil t)
379                 (search-forward string-target nil t)))))
380     (beginning-of-line)
381     (message "Found `%s' in %s" thing where)))
382
383 (defun calc-view-news ()
384   (interactive)
385   (calc-quit)
386   (view-emacs-news)
387   (re-search-forward "^\\*+ .*\\<Calc\\>" nil t))
388
389 (defvar calc-help-long-names '((?b . "binary/business")
390                                (?g . "graphics")
391                                (?j . "selection")
392                                (?k . "combinatorics/statistics")
393                                (?u . "units/statistics")))
394
395 (defun calc-full-help ()
396   (interactive)
397   (with-output-to-temp-buffer "*Help*"
398     (princ "GNU Emacs Calculator.\n")
399     (princ "  By Dave Gillespie.\n")
400     (princ (format "Type `h s' for a more detailed summary.\n"))
401     (princ (format
402             "Or type `h i' to read the full Calc manual on-line.\n\n"))
403     (princ "Basic keys:\n")
404     (let* ((calc-full-help-flag t))
405       (mapc (function (lambda (x) (princ (format
406                                           "  %s\n"
407                                           (substitute-command-keys x)))))
408             (nreverse (cdr (reverse (cdr (calc-help))))))
409       (mapc (function (lambda (prefix)
410                         (let ((msgs (condition-case nil
411                                         (funcall prefix)
412                                       (error nil))))
413                           (if (car msgs)
414                               (princ
415                                (if (eq (nth 2 msgs) ?v)
416                                    (format
417                                     "\n`v' or `V' prefix (vector/matrix) keys: \n")
418                                  (if (nth 2 msgs)
419                                      (format
420                                       "\n`%c' prefix (%s) keys:\n"
421                                       (nth 2 msgs)
422                                       (or (cdr (assq (nth 2 msgs)
423                                                      calc-help-long-names))
424                                           (nth 1 msgs)))
425                                    (format "\n%s-modified keys:\n"
426                                            (capitalize (nth 1 msgs)))))))
427                           (mapcar (function
428                                    (lambda (x)
429                                      (princ (format
430                                              "  %s\n"
431                                              (substitute-command-keys x)))))
432                                   (car msgs)))))
433             '(calc-inverse-prefix-help
434               calc-hyperbolic-prefix-help
435               calc-inv-hyp-prefix-help
436               calc-option-prefix-help
437               calc-a-prefix-help
438               calc-b-prefix-help
439               calc-c-prefix-help
440               calc-d-prefix-help
441               calc-f-prefix-help
442               calc-g-prefix-help
443               calc-h-prefix-help
444               calc-j-prefix-help
445               calc-k-prefix-help
446               calc-l-prefix-help
447               calc-m-prefix-help
448               calc-r-prefix-help
449               calc-s-prefix-help
450               calc-t-prefix-help
451               calc-u-prefix-help
452               calc-v-prefix-help
453               calc-shift-Y-prefix-help
454               calc-shift-Z-prefix-help
455               calc-z-prefix-help)))
456     (print-help-return-message)))
457
458 (defun calc-h-prefix-help ()
459   (interactive)
460   (calc-do-prefix-help
461    '("Help; Bindings; Info, Tutorial, Summary; News"
462      "describe: Key, C (briefly), Function, Variable")
463    "help" ?h))
464
465 (defun calc-inverse-prefix-help ()
466   (interactive)
467   (calc-do-prefix-help
468    '("I + S (arcsin), C (arccos), T (arctan); Q (square)"
469      "I + E (ln), L (exp), B (alog: B^X); f E (lnp1), f L (expm1)"
470      "I + F (ceiling), R (truncate); a S (invert func)"
471      "I + a m (match-not); c h (from-hms); k n (prev prime)"
472      "I + f G (gamma-Q); f e (erfc); k B (etc., lower-tail dists)"
473      "I + V S (reverse sort); V G (reverse grade)"
474      "I + v s (remove subvec); v h (tail)"
475      "I + t + (alt sum), t M (mean with error)"
476      "I + t S (pop std dev), t C (pop covar)")
477    "inverse" nil))
478
479 (defun calc-hyperbolic-prefix-help ()
480   (interactive)
481   (calc-do-prefix-help
482    '("H + S (sinh), C (cosh), T (tanh); E (exp10), L (log10)"
483      "H + F (float floor), R (float round); P (constant \"e\")"
484      "H + a d (total derivative); k c (permutations)"
485      "H + k b (bern-poly), k e (euler-poly); k s (stirling-2)"
486      "H + f G (gamma-g), f B (beta-B); v h (rhead), v k (rcons)"
487      "H + v e (expand w/filler); V H (weighted histogram)"
488      "H + a S (general solve eqn), j I (general isolate)"
489      "H + a R (widen/root), a N (widen/min), a X (widen/max)"
490      "H + t M (median), t S (variance), t C (correlation coef)"
491      "H + c f/F/c (pervasive float/frac/clean)")
492    "hyperbolic" nil))
493
494 (defun calc-inv-hyp-prefix-help ()
495   (interactive)
496   (calc-do-prefix-help
497    '("I H + S (arcsinh), C (arccosh), T (arctanh)"
498      "I H + E (log10), L (exp10); f G (gamma-G)"
499      "I H + F (float ceiling), R (float truncate)"
500      "I H + t S (pop variance)"
501      "I H + a S (general invert func); v h (rtail)")
502    "inverse-hyperbolic" nil))
503
504 (defun calc-option-prefix-help ()
505   (interactive)
506   (calc-do-prefix-help
507    '("")
508    "option" nil))
509
510 (defun calc-f-prefix-help ()
511   (interactive)
512   (calc-do-prefix-help
513    '("miN, maX; Hypot; Im, Re; Sign; [, ] (incr/decr)"
514      "Gamma, Beta, Erf, besselJ, besselY"
515      "SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2"
516      "SHIFT + Abssqr; Mantissa, eXponent, Scale"
517      "SHIFT + incomplete: Gamma-P, Beta-I")
518    "functions" ?f))
519
520
521 (defun calc-s-prefix-help ()
522   (interactive)
523   (calc-do-prefix-help
524    '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)"
525      "Let; Copy, K=copy constant; Declare; Insert, Perm; Edit"
526      "Negate, +, -, *, /, ^, &, |, [, ]; Map"
527      "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit"
528      "SHIFT + LineStyles, PointStyles, plotRejects; Units"
529      "SHIFT + Eval-, AlgSimp-, ExtSimp-, FitRules")
530    "store" ?s))
531
532 (defun calc-r-prefix-help ()
533   (interactive)
534   (calc-do-prefix-help
535    '("digits 0-9: recall, same as `s r 0-9'"
536      "Save to register, Insert from register")
537    "recall/register" ?r))
538
539
540 (defun calc-j-prefix-help ()
541   (interactive)
542   (calc-do-prefix-help
543    '("Select, Additional, Once; eVal, Formula; Rewrite"
544      "More, Less, 1-9, Next, Previous"
545      "Unselect, Clear; Display; Enable; Breakable"
546      "\\=' (replace), \\=` (edit), +, -, *, /, RET (grab), DEL"
547      "SHIFT + swap: Left, Right; maybe: Select, Once"
548      "SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate"
549      "SHIFT + Negate, & (invert); Unpack")
550    "select" ?j))
551
552
553 (defun calc-a-prefix-help ()
554   (interactive)
555   (calc-do-prefix-help
556    '("Simplify, Extended-simplify, eVal; \" (exp-formula)"
557      "eXpand, Collect, Factor, Apart, Norm-rat"
558      "GCD, /, \\, % (polys); Polint"
559      "Derivative, Integral, Taylor; _ (subscr)"
560      "suBstitute; Rewrite, Match"
561      "SHIFT + Solve; Root, miN, maX; Poly-roots; Fit"
562      "SHIFT + Map; Tabulate, + (sum), * (prod); num-Integ"
563      "relations: =, # (not =), <, >, [ (< or =), ] (> or =)"
564      "logical: & (and), | (or), ! (not); : (if)"
565      "misc: { (in-set); . (rmeq)")
566    "algebra" ?a))
567
568
569 (defun calc-b-prefix-help ()
570   (interactive)
571   (calc-do-prefix-help
572    '("And, Or, Xor, Diff, Not; Wordsize, Clip"
573      "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift"
574      "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr"
575      "SHIFT + business: Sln, sYd, Ddb; %ch")
576    "binary/bus" ?b))
577
578
579 (defun calc-c-prefix-help ()
580   (interactive)
581   (calc-do-prefix-help
582    '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %"
583      "SHIFT + Fraction")
584    "convert" ?c))
585
586
587 (defun calc-d-prefix-help ()
588   (interactive)
589   (calc-do-prefix-help
590    '("Group, \",\"; Normal, Fix, Sci, Eng, \".\"; Over"
591      "Radix, Zeros, 2, 8, 0, 6; Hms; Date; Complex, I, J"
592      "Why; Line-nums, line-Breaks; <, =, > (justify); Plain"
593      "\" (strings); Truncate, [, ]; SPC (refresh), RET, @"
594      "SHIFT + language: Normal, One-line, Big, Unformatted"
595      "SHIFT + language: C, Pascal, Fortran; TeX, LaTeX, Eqn"
596      "SHIFT + language: Yacas, X=Maxima, A=Giac"
597      "SHIFT + language: Mathematica, W=Maple")
598    "display" ?d))
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")
611    "graph" ?g))
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")
624    "combinatorics" ?k))
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; preserve Embedded modes"
632      "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute"
633      "SHIFT + simplify: Off, Num, basIc, Algebraic, Bin, Ext, Units")
634    "mode" ?m))
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'")
646    "trail/time" ?t))
647
648
649 (defun calc-u-prefix-help ()
650   (interactive)
651   (calc-do-prefix-help
652    '("Simplify, Convert, coNvert exact, 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)")
658    "units/stat" ?u))
659
660 (defun calc-l-prefix-help ()
661   (interactive)
662   (calc-do-prefix-help
663    '("Quantity, DB level, Np level"
664      "+, -, *, /"
665      "Scientific pitch notation, Midi number, Frequency"
666      )
667    "log units" ?l))
668
669 (defun calc-v-prefix-help ()
670   (interactive)
671   (calc-do-prefix-help
672    '("Pack, Unpack, Identity, Diagonal, indeX, Build"
673      "Row, Column, Subvector; Length; Find; Mask, Expand"
674      "Transpose, Arrange, reVerse; Head, Kons; rNorm"
675      "SHIFT + Det, & (inverse), LUD, Trace, conJtrn, Cross"
676      "SHIFT + Sort, Grade, Histogram; cNorm"
677      "SHIFT + Apply, Map, Reduce, accUm, Inner-, Outer-prod"
678      "SHIFT + sets: V (union), ^ (intersection), - (diff)"
679      "SHIFT + sets: Xor, ~ (complement), Floor, Enum"
680      "SHIFT + sets: : (span), # (card), + (rdup)"
681      "<, =, > (justification); , (commas); [, {, ( (brackets)"
682      "} (matrix brackets); . (abbreviate); / (multi-lines)")
683    "vec/mat" ?v))
684
685 (provide 'calc-help)
686
687 ;;; calc-help.el ends here