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