Mercurial > emacs
annotate lisp/calc/calc-help.el @ 58681:f4f966b4564d
Add a provide statement.
(calc-Need-calc-alg-2): Remove it.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Tue, 30 Nov 2004 17:30:34 +0000 |
parents | 8564d764ff4d |
children | b6f65248543d |
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 |
57634
0dd4932a3caa
(calc-describe-bindings): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
57576
diff
changeset
|
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 |
0dd4932a3caa
(calc-describe-bindings): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
57576
diff
changeset
|
4 ;; 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
|
5 |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
6 ;; Author: David Gillespie <daveg@synaptics.com> |
58551
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
7 ;; Maintainer: Jay Belanger <belanger@truman.edu> |
40785 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is distributed in the hope that it will be useful, | |
12 ;; but WITHOUT ANY WARRANTY. No author or distributor | |
13 ;; accepts responsibility to anyone for the consequences of using it | |
14 ;; or for whether it serves any particular purpose or works at all, | |
15 ;; unless he says so in writing. Refer to the GNU Emacs General Public | |
16 ;; License for full details. | |
17 | |
18 ;; Everyone is granted permission to copy, modify and redistribute | |
19 ;; GNU Emacs, but only under the conditions described in the | |
20 ;; GNU Emacs General Public License. A copy of this license is | |
21 ;; supposed to have been given to you along with GNU Emacs so you | |
22 ;; can know your rights and responsibilities. It should be in a | |
23 ;; file named COPYING. Among other things, the copyright notice | |
24 ;; and this notice must be preserved on all copies. | |
25 | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
26 ;;; Commentary: |
40785 | 27 |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
28 ;;; Code: |
40785 | 29 |
30 ;; This file is autoloaded from calc-ext.el. | |
58658
8564d764ff4d
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58551
diff
changeset
|
31 |
40785 | 32 (require 'calc-ext) |
33 (require 'calc-macs) | |
34 | |
35 (defun calc-help-prefix (arg) | |
36 "This key is the prefix for Calc help functions. See calc-help-for-help." | |
37 (interactive "P") | |
38 (or calc-dispatch-help (sit-for echo-keystrokes)) | |
39 (let ((key (calc-read-key-sequence | |
40 (if calc-dispatch-help | |
41 "Calc Help options: Help, Info, Tutorial, Summary; Key, Function; ?=more" | |
42 (format "%s (Type ? for a list of Calc Help options)" | |
43 (key-description (this-command-keys)))) | |
44 calc-help-map))) | |
45 (setq key (lookup-key calc-help-map key)) | |
46 (message "") | |
47 (if key | |
48 (call-interactively key) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
49 (beep)))) |
40785 | 50 |
51 (defun calc-help-for-help (arg) | |
52 "You have typed `h', the Calc help character. Type a Help option: | |
53 | |
54 B calc-describe-bindings. Display a table of all key bindings. | |
55 H calc-full-help. Display all `?' key messages at once. | |
56 | |
57 I calc-info. Read the Calc manual using the Info system. | |
58 T calc-tutorial. Read the Calc tutorial using the Info system. | |
59 S calc-info-summary. Read the Calc summary using the Info system. | |
60 | |
61 C calc-describe-key-briefly. Look up the command name for a given key. | |
62 K calc-describe-key. Look up a key's documentation in the manual. | |
63 F calc-describe-function. Look up a function's documentation in the manual. | |
64 V calc-describe-variable. Look up a variable's documentation in the manual. | |
65 | |
66 N calc-view-news. Display Calc history of changes. | |
67 | |
68 C-c Describe conditions for copying Calc. | |
69 C-d Describe how you can get a new copy of Calc or report a bug. | |
70 C-w Describe how there is no warranty for Calc." | |
71 (interactive "P") | |
72 (if calc-dispatch-help | |
73 (let (key) | |
74 (save-window-excursion | |
75 (describe-function 'calc-help-for-help) | |
76 (select-window (get-buffer-window "*Help*")) | |
77 (while (progn | |
78 (message "Calc Help options: Help, Info, ... press SPC, DEL to scroll, C-g to cancel") | |
79 (memq (car (setq key (calc-read-key t))) | |
80 '(? ?\C-h ?\C-? ?\C-v ?\M-v))) | |
81 (condition-case err | |
82 (if (memq (car key) '(? ?\C-v)) | |
83 (scroll-up) | |
84 (scroll-down)) | |
85 (error (beep))))) | |
86 (calc-unread-command (cdr key)) | |
87 (calc-help-prefix nil)) | |
88 (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
|
89 (calc-help-prefix arg)))) |
40785 | 90 |
91 (defun calc-describe-copying () | |
92 (interactive) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
93 (calc-info-goto-node "Copying")) |
40785 | 94 |
95 (defun calc-describe-distribution () | |
96 (interactive) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
97 (calc-info-goto-node "Reporting Bugs")) |
40785 | 98 |
99 (defun calc-describe-no-warranty () | |
100 (interactive) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
101 (calc-info-goto-node "Copying") |
40785 | 102 (let ((case-fold-search nil)) |
103 (search-forward " NO WARRANTY")) | |
104 (beginning-of-line) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
105 (recenter 0)) |
40785 | 106 |
107 (defun calc-describe-bindings () | |
108 (interactive) | |
109 (describe-bindings) | |
110 (save-excursion | |
111 (set-buffer "*Help*") | |
57634
0dd4932a3caa
(calc-describe-bindings): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
57576
diff
changeset
|
112 (let ((inhibit-read-only t)) |
57576
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
113 (goto-char (point-min)) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
114 (when (search-forward "Major Mode Bindings:" nil t) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
115 (delete-region (point-min) (point)) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
116 (insert "Calc Mode Bindings:")) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
117 (when (search-forward "Global bindings:" nil t) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
118 (forward-line -1) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
119 (delete-region (point) (point-max))) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
120 (goto-char (point-min)) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
121 (while |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
122 (re-search-forward |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
123 "\n[a-z] [0-9]\\( .*\n\\)\\([a-z] [0-9]\\1\\)*[a-z] \\([0-9]\\)\\1" |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
124 nil t) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
125 (let ((dig1 (char-after (1- (match-beginning 1)))) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
126 (dig2 (char-after (match-beginning 3)))) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
127 (delete-region (match-end 1) (match-end 0)) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
128 (goto-char (match-beginning 1)) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
129 (delete-backward-char 1) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
130 (delete-char 5) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
131 (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) |
5e8a69bc2cfa
(calc-describe-bindings): Set `buffer-read-only' to nil while working
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57456
diff
changeset
|
132 (goto-char (point-min))))) |
40785 | 133 |
134 (defun calc-describe-key-briefly (key) | |
135 (interactive "kDescribe key briefly: ") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
136 (calc-describe-key key t)) |
40785 | 137 |
58551
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
138 (defvar Info-history) |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
139 |
40785 | 140 (defun calc-describe-key (key &optional briefly) |
141 (interactive "kDescribe key: ") | |
142 (let ((defn (if (eq (key-binding key) 'calc-dispatch) | |
143 (let ((key2 (calc-read-key-sequence | |
144 (format "Describe key briefly: %s-" | |
145 (key-description key)) | |
146 calc-dispatch-map))) | |
147 (setq key (concat key key2)) | |
148 (lookup-key calc-dispatch-map key2)) | |
149 (if (eq (key-binding key) 'calc-help-prefix) | |
150 (let ((key2 (calc-read-key-sequence | |
151 (format "Describe key briefly: %s-" | |
152 (key-description key)) | |
153 calc-help-map))) | |
154 (setq key (concat key key2)) | |
155 (lookup-key calc-help-map key2)) | |
156 (key-binding key)))) | |
157 (inv nil) | |
58551
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
158 (hyp nil) |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
159 calc-summary-indentation) |
40785 | 160 (while (or (equal key "I") (equal key "H")) |
161 (if (equal key "I") | |
162 (setq inv (not inv)) | |
163 (setq hyp (not hyp))) | |
164 (setq key (read-key-sequence (format "Describe key%s:%s%s " | |
165 (if briefly " briefly" "") | |
166 (if inv " I" "") | |
167 (if hyp " H" ""))) | |
168 defn (key-binding key))) | |
169 (let ((desc (key-description key)) | |
170 target) | |
171 (if (string-match "^ESC " desc) | |
172 (setq desc (concat "M-" (substring desc 4)))) | |
173 (while (string-match "^M-# \\(ESC \\|C-\\)" desc) | |
174 (setq desc (concat "M-# " (substring desc (match-end 0))))) | |
175 (if briefly | |
176 (let ((msg (save-excursion | |
177 (set-buffer (get-buffer-create "*Calc Summary*")) | |
178 (if (= (buffer-size) 0) | |
179 (progn | |
180 (message "Reading Calc summary from manual...") | |
181 (save-window-excursion | |
182 (save-excursion | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
183 (calc-info-goto-node "Summary") |
40785 | 184 (goto-char (point-min)) |
185 (forward-line 1) | |
186 (copy-to-buffer "*Calc Summary*" | |
187 (point) (point-max)) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
188 (if Info-history |
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
189 (Info-last)))) |
40785 | 190 (setq case-fold-search nil) |
191 (re-search-forward "^\\(.*\\)\\[\\.\\. a b") | |
192 (setq calc-summary-indentation | |
193 (- (match-end 1) (match-beginning 1))))) | |
194 (goto-char (point-min)) | |
195 (setq target (if (and (string-match "[0-9]\\'" desc) | |
196 (not (string-match "[d#]" desc))) | |
197 (concat (substring desc 0 -1) "0-9") | |
198 desc)) | |
199 (if (re-search-forward | |
200 (format "\n%s%s%s%s[ a-zA-Z]" | |
201 (make-string (+ calc-summary-indentation 9) | |
202 ?\.) | |
203 (if (string-match "M-#" desc) " " | |
204 (if inv | |
205 (if hyp "I H " " I ") | |
206 (if hyp " H " " "))) | |
207 (regexp-quote target) | |
208 (make-string (max (- 6 (length target)) 0) | |
209 ?\ )) | |
210 nil t) | |
211 (let (pt) | |
212 (beginning-of-line) | |
213 (forward-char calc-summary-indentation) | |
214 (setq pt (point)) | |
215 (end-of-line) | |
216 (buffer-substring pt (point))))))) | |
217 (if msg | |
218 (let ((args (substring msg 0 9)) | |
219 (keys (substring msg 9 19)) | |
220 (prompts (substring msg 19 38)) | |
221 (notes "") | |
222 (cmd (substring msg 40)) | |
223 msg) | |
224 (if (string-match "\\` +" args) | |
225 (setq args (substring args (match-end 0)))) | |
226 (if (string-match " +\\'" args) | |
227 (setq args (substring args 0 (match-beginning 0)))) | |
228 (if (string-match "\\` +" keys) | |
229 (setq keys (substring keys (match-end 0)))) | |
230 (if (string-match " +\\'" keys) | |
231 (setq keys (substring keys 0 (match-beginning 0)))) | |
232 (if (string-match " [0-9,]+\\'" prompts) | |
233 (setq notes (substring prompts (1+ (match-beginning 0))) | |
234 prompts (substring prompts 0 (match-beginning 0)))) | |
235 (if (string-match " +\\'" prompts) | |
236 (setq prompts (substring prompts 0 (match-beginning 0)))) | |
237 (if (string-match "\\` +" prompts) | |
238 (setq prompts (substring prompts (match-end 0)))) | |
239 (setq msg (format | |
240 "%s: %s%s`%s'%s%s %s%s" | |
241 (if (string-match | |
242 "\\`\\(calc-[-a-zA-Z0-9]+\\) *\\(.*\\)\\'" | |
243 cmd) | |
244 (prog1 (math-match-substring cmd 1) | |
245 (setq cmd (math-match-substring cmd 2))) | |
246 defn) | |
247 args (if (equal args "") "" " ") | |
248 keys | |
249 (if (equal prompts "") "" " ") prompts | |
250 (if (equal cmd "") "" " => ") cmd)) | |
251 (message "%s%s%s runs %s%s" | |
252 (if inv "I " "") (if hyp "H " "") desc | |
253 msg | |
254 (if (equal notes "") "" | |
255 (format " (?=notes %s)" notes))) | |
256 (let ((key (calc-read-key t))) | |
257 (if (eq (car key) ??) | |
258 (if (equal notes "") | |
259 (message "No notes for this command") | |
260 (while (string-match "," notes) | |
261 (aset notes (match-beginning 0) ? )) | |
262 (setq notes (sort (car (read-from-string | |
263 (format "(%s)" notes))) | |
264 '<)) | |
265 (with-output-to-temp-buffer "*Help*" | |
266 (princ (format "%s\n\n" msg)) | |
267 (set-buffer "*Calc Summary*") | |
268 (re-search-forward "^ *NOTES") | |
269 (while notes | |
270 (re-search-forward | |
271 (format "^ *%d\\. " (car notes))) | |
272 (beginning-of-line) | |
273 (let ((pt (point))) | |
274 (forward-line 1) | |
275 (or (re-search-forward "^ ? ?[0-9]+\\. " nil t) | |
276 (goto-char (point-max))) | |
277 (beginning-of-line) | |
278 (princ (buffer-substring pt (point)))) | |
279 (setq notes (cdr notes))) | |
280 (print-help-return-message))) | |
281 (calc-unread-command (cdr key))))) | |
282 (if (or (null defn) (integerp defn)) | |
283 (message "%s is undefined" desc) | |
284 (message "%s runs the command %s" | |
285 desc | |
286 (if (symbolp defn) defn (prin1-to-string defn)))))) | |
287 (if inv (setq desc (concat "I " desc))) | |
288 (if hyp (setq desc (concat "H " desc))) | |
289 (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
|
290 (string-match "[A-Z][A-Z][A-Z]" desc)))))) |
40785 | 291 |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
292 (defvar calc-help-function-list nil |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
293 "List of functions provided by Calc.") |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
294 |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
295 (defvar calc-help-variable-list nil |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
296 "List of variables provided by Calc.") |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
297 |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
298 (defun calc-help-index-entries (&rest indices) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
299 "Create a list of entries from the INDICES in the Calc info manual." |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
300 (let ((entrylist '()) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
301 entry) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
302 (require 'info nil t) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
303 (while indices |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
304 (condition-case nil |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
305 (with-temp-buffer |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
306 (Info-mode) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
307 (Info-goto-node (concat "(Calc)" (car indices) " Index")) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
308 (goto-char (point-min)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
309 (while (re-search-forward "\n\\* \\(.*\\): " nil t) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
310 (setq entry (match-string 1)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
311 (if (and (not (string-match "<[1-9]+>" entry)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
312 (not (string-match "(.*)" entry)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
313 (not (string= entry "Menu"))) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
314 (unless (assoc entry entrylist) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
315 (setq entrylist (cons entry entrylist)))))) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
316 (error nil)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
317 (setq indices (cdr indices))) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
318 entrylist)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
319 |
40785 | 320 (defun calc-describe-function (&optional func) |
321 (interactive) | |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
322 (unless calc-help-function-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
323 (setq calc-help-function-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
324 (calc-help-index-entries "Function" "Command"))) |
40785 | 325 (or func |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
326 (setq func (completing-read "Describe function: " |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
327 calc-help-function-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
328 nil t))) |
40785 | 329 (if (string-match "\\`calc-." func) |
330 (calc-describe-thing func "Command Index") | |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
331 (calc-describe-thing func "Function Index"))) |
40785 | 332 |
333 (defun calc-describe-variable (&optional var) | |
334 (interactive) | |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
335 (unless calc-help-variable-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
336 (setq calc-help-variable-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
337 (calc-help-index-entries "Variable"))) |
40785 | 338 (or var |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
339 (setq var (completing-read "Describe variable: " |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
340 calc-help-variable-list |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
341 nil t))) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
342 (calc-describe-thing var "Variable Index")) |
40785 | 343 |
344 (defun calc-describe-thing (thing where &optional target not-quoted) | |
345 (message "Looking for `%s' in %s..." thing where) | |
346 (let ((savewin (current-window-configuration))) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
347 (calc-info-goto-node where) |
40785 | 348 (or (let ((case-fold-search nil)) |
349 (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." | |
350 (regexp-quote thing)) | |
351 nil t)) | |
352 (and (string-match "\\`\\([a-z ]*\\)[0-9]\\'" thing) | |
353 (re-search-forward (format "\n\\* +%s[01]-9: \\(.*\\)\\." | |
354 (substring thing 0 -1)) | |
355 nil t) | |
356 (setq thing (format "%s9" (substring thing 0 -1)))) | |
357 (progn | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
358 (if Info-history |
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
359 (Info-last)) |
40785 | 360 (set-window-configuration savewin) |
361 (error "Can't find `%s' in %s" thing where))) | |
362 (let (Info-history) | |
363 (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1)))) | |
364 (or (let ((case-fold-search nil)) | |
365 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
366 (or target thing) | |
367 (or target thing) | |
368 (or target thing)) nil t) | |
369 (and not-quoted | |
370 (let ((case-fold-search t)) | |
371 (search-forward (or target thing) nil t))) | |
372 (search-forward (format "`%s'" (or target thing)) nil t) | |
373 (search-forward (or target thing) nil t))) | |
374 (let ((case-fold-search t)) | |
375 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
376 (or target thing) | |
377 (or target thing) | |
378 (or target thing)) nil t) | |
379 (search-forward (format "`%s'" (or target thing)) nil t) | |
380 (search-forward (or target thing) nil t)))) | |
381 (beginning-of-line) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
382 (message "Found `%s' in %s" thing where))) |
40785 | 383 |
384 (defun calc-view-news () | |
385 (interactive) | |
386 (let ((path load-path)) | |
387 (while (and path | |
388 (not (file-exists-p (expand-file-name "calc.el" (car path))))) | |
389 (setq path (cdr path))) | |
390 (or (and path | |
391 (file-exists-p (expand-file-name "README" (car path)))) | |
392 (error "Can't locate Calc sources")) | |
393 (calc-quit) | |
394 (switch-to-buffer "*Help*") | |
395 (erase-buffer) | |
396 (insert-file-contents (expand-file-name "README" (car path))) | |
397 (search-forward "Summary of changes") | |
398 (forward-line -1) | |
399 (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
|
400 (goto-char (point-min)))) |
40785 | 401 |
58551
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
402 (defvar calc-help-long-names '((?b . "binary/business") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
403 (?g . "graphics") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
404 (?j . "selection") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
405 (?k . "combinatorics/statistics") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
406 (?u . "units/statistics"))) |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
407 |
40785 | 408 (defun calc-full-help () |
409 (interactive) | |
410 (with-output-to-temp-buffer "*Help*" | |
411 (princ (format "GNU Emacs Calculator version %s of %s.\n" | |
412 calc-version calc-version-date)) | |
413 (princ " By Dave Gillespie, daveg@synaptics.com.\n") | |
414 (princ " Copyright (C) 1990, 1993 Free Software Foundation, Inc.\n\n") | |
415 (princ "Type `h s' for a more detailed summary.\n") | |
416 (princ "Or type `h i' to read the full Calc manual on-line.\n\n") | |
417 (princ "Basic keys:\n") | |
418 (let* ((calc-full-help-flag t)) | |
419 (mapcar (function (lambda (x) (princ (format " %s\n" x)))) | |
420 (nreverse (cdr (reverse (cdr (calc-help)))))) | |
421 (mapcar (function (lambda (prefix) | |
422 (let ((msgs (condition-case err | |
423 (funcall prefix) | |
424 (error nil)))) | |
425 (if (car msgs) | |
426 (princ | |
427 (if (eq (nth 2 msgs) ?v) | |
428 "\n`v' or `V' prefix (vector/matrix) keys: \n" | |
429 (if (nth 2 msgs) | |
430 (format | |
431 "\n`%c' prefix (%s) keys:\n" | |
432 (nth 2 msgs) | |
433 (or (cdr (assq (nth 2 msgs) | |
434 calc-help-long-names)) | |
435 (nth 1 msgs))) | |
436 (format "\n%s-modified keys:\n" | |
437 (capitalize (nth 1 msgs))))))) | |
438 (mapcar (function (lambda (x) | |
439 (princ (format " %s\n" x)))) | |
440 (car msgs))))) | |
441 '(calc-inverse-prefix-help | |
442 calc-hyperbolic-prefix-help | |
443 calc-inv-hyp-prefix-help | |
444 calc-a-prefix-help | |
445 calc-b-prefix-help | |
446 calc-c-prefix-help | |
447 calc-d-prefix-help | |
448 calc-f-prefix-help | |
449 calc-g-prefix-help | |
450 calc-h-prefix-help | |
451 calc-j-prefix-help | |
452 calc-k-prefix-help | |
453 calc-m-prefix-help | |
454 calc-r-prefix-help | |
455 calc-s-prefix-help | |
456 calc-t-prefix-help | |
457 calc-u-prefix-help | |
458 calc-v-prefix-help | |
459 calc-shift-Y-prefix-help | |
460 calc-shift-Z-prefix-help | |
461 calc-z-prefix-help))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
462 (print-help-return-message))) |
40785 | 463 |
464 (defun calc-h-prefix-help () | |
465 (interactive) | |
466 (calc-do-prefix-help | |
467 '("Help; Bindings; Info, Tutorial, Summary; News" | |
468 "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
|
469 "help" ?h)) |
40785 | 470 |
471 (defun calc-inverse-prefix-help () | |
472 (interactive) | |
473 (calc-do-prefix-help | |
474 '("I + S (arcsin), C (arccos), T (arctan); Q (square)" | |
475 "I + E (ln), L (exp), B (alog: B^X); f E (lnp1), f L (expm1)" | |
476 "I + F (ceiling), R (truncate); a S (invert func)" | |
477 "I + a m (match-not); c h (from-hms); k n (prev prime)" | |
478 "I + f G (gamma-Q); f e (erfc); k B (etc., lower-tail dists)" | |
479 "I + V S (reverse sort); V G (reverse grade)" | |
480 "I + v s (remove subvec); v h (tail)" | |
481 "I + t + (alt sum), t M (mean with error)" | |
482 "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
|
483 "inverse" nil)) |
40785 | 484 |
485 (defun calc-hyperbolic-prefix-help () | |
486 (interactive) | |
487 (calc-do-prefix-help | |
488 '("H + S (sinh), C (cosh), T (tanh); E (exp10), L (log10)" | |
489 "H + F (float floor), R (float round); P (constant \"e\")" | |
490 "H + a d (total derivative); k c (permutations)" | |
491 "H + k b (bern-poly), k e (euler-poly); k s (stirling-2)" | |
492 "H + f G (gamma-g), f B (beta-B); v h (rhead), v k (rcons)" | |
493 "H + v e (expand w/filler); V H (weighted histogram)" | |
494 "H + a S (general solve eqn), j I (general isolate)" | |
495 "H + a R (widen/root), a N (widen/min), a X (widen/max)" | |
496 "H + t M (median), t S (variance), t C (correlation coef)" | |
497 "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
|
498 "hyperbolic" nil)) |
40785 | 499 |
500 (defun calc-inv-hyp-prefix-help () | |
501 (interactive) | |
502 (calc-do-prefix-help | |
503 '("I H + S (arcsinh), C (arccosh), T (arctanh)" | |
504 "I H + E (log10), L (exp10); f G (gamma-G)" | |
505 "I H + F (float ceiling), R (float truncate)" | |
506 "I H + t S (pop variance)" | |
507 "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
|
508 "inverse-hyperbolic" nil)) |
40785 | 509 |
510 | |
511 (defun calc-f-prefix-help () | |
512 (interactive) | |
513 (calc-do-prefix-help | |
514 '("miN, maX; Hypot; Im, Re; Sign; [, ] (incr/decr)" | |
515 "Gamma, Beta, Erf, besselJ, besselY" | |
516 "SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2" | |
517 "SHIFT + Abssqr; Mantissa, eXponent, Scale" | |
518 "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
|
519 "functions" ?f)) |
40785 | 520 |
521 | |
522 (defun calc-s-prefix-help () | |
523 (interactive) | |
524 (calc-do-prefix-help | |
525 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)" | |
526 "Let; Copy; Declare; Insert, Perm; Edit" | |
527 "Negate, +, -, *, /, ^, &, |, [, ]; Map" | |
528 "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" | |
529 "SHIFT + LineStyles, PointStyles, plotRejects; Units" | |
530 "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
|
531 "store" ?s)) |
40785 | 532 |
533 (defun calc-r-prefix-help () | |
534 (interactive) | |
535 (calc-do-prefix-help | |
536 '("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
|
537 "recall" ?r)) |
40785 | 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") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
550 "select" ?j)) |
40785 | 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)") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
566 "algebra" ?a)) |
40785 | 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") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
576 "binary/bus" ?b)) |
40785 | 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") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
584 "convert" ?c)) |
40785 | 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" | |
45580
955efae16491
(calc-d-prefix-help): Add `@'.
Miles Bader <miles@gnu.org>
parents:
41271
diff
changeset
|
593 "\" (strings); Truncate, [, ]; SPC (refresh), RET, @" |
40785 | 594 "SHIFT + language: Normal, One-line, Big, Unformatted" |
595 "SHIFT + language: C, Pascal, Fortran; TeX, Eqn" | |
596 "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
|
597 "display" ?d)) |
40785 | 598 |
599 | |
600 (defun calc-g-prefix-help () | |
601 (interactive) | |
602 (calc-do-prefix-help | |
603 '("Fast; Add, Delete, Juggle; Plot, Clear; Quit" | |
604 "Header, Name, Grid, Border, Key; View-commands, X-display" | |
605 "x-axis: Range, Title, Log, Zero; lineStyle" | |
606 "SHIFT + y-axis: Range, Title, Log, Zero; pointStyle" | |
607 "SHIFT + Print; Device, Output-file; X-geometry" | |
608 "SHIFT + Num-pts; Command, Kill, View-trail" | |
609 "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
|
610 "graph" ?g)) |
40785 | 611 |
612 | |
613 (defun calc-k-prefix-help () | |
614 (interactive) | |
615 (calc-do-prefix-help | |
616 '("GCD, LCM; Choose (binomial), Double-factorial" | |
617 "Random, random-Again, sHuffle" | |
618 "Factors, Prime-test, Next-prime, Totient, Moebius" | |
619 "Bernoulli, Euler, Stirling" | |
620 "SHIFT + Extended-gcd" | |
621 "SHIFT + dists: Binomial, Chi-square, F, Normal" | |
622 "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
|
623 "combinatorics" ?k)) |
40785 | 624 |
625 | |
626 (defun calc-m-prefix-help () | |
627 (interactive) | |
628 (calc-do-prefix-help | |
629 '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat" | |
630 "Working; Xtensions; Mode-save" | |
631 "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" | |
632 "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
|
633 "mode" ?m)) |
40785 | 634 |
635 | |
636 (defun calc-t-prefix-help () | |
637 (interactive) | |
638 (calc-do-prefix-help | |
639 '("Display; Fwd, Back; Next, Prev, Here, [, ]; Yank" | |
640 "Search, Rev; In, Out; <, >; Kill; Marker; . (abbrev)" | |
641 "SHIFT + time: Now; Part; Date, Julian, Unix, Czone" | |
642 "SHIFT + time: newWeek, newMonth, newYear; Incmonth" | |
643 "SHIFT + time: +, - (business days)" | |
644 "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
|
645 "trail/time" ?t)) |
40785 | 646 |
647 | |
648 (defun calc-u-prefix-help () | |
649 (interactive) | |
650 (calc-do-prefix-help | |
651 '("Simplify, Convert, Temperature-convert, Base-units" | |
652 "Autorange; Remove, eXtract; Explain; View-table; 0-9" | |
653 "Define, Undefine, Get-defn, Permanent" | |
654 "SHIFT + View-table-other-window" | |
655 "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" | |
656 "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
|
657 "units/stat" ?u)) |
40785 | 658 |
659 | |
660 (defun calc-v-prefix-help () | |
661 (interactive) | |
662 (calc-do-prefix-help | |
663 '("Pack, Unpack, Identity, Diagonal, indeX, Build" | |
664 "Row, Column, Subvector; Length; Find; Mask, Expand" | |
665 "Tranpose, Arrange, reVerse; Head, Kons; rNorm" | |
666 "SHIFT + Det, & (inverse), LUD, Trace, conJtrn, Cross" | |
667 "SHIFT + Sort, Grade, Histogram; cNorm" | |
668 "SHIFT + Apply, Map, Reduce, accUm, Inner-, Outer-prod" | |
669 "SHIFT + sets: V (union), ^ (intersection), - (diff)" | |
670 "SHIFT + sets: Xor, ~ (complement), Floor, Enum" | |
671 "SHIFT + sets: : (span), # (card), + (rdup)" | |
672 "<, =, > (justification); , (commas); [, {, ( (brackets)" | |
673 "} (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
|
674 "vec/mat" ?v)) |
40785 | 675 |
58658
8564d764ff4d
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58551
diff
changeset
|
676 (provide 'calc-help) |
8564d764ff4d
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58551
diff
changeset
|
677 |
57634
0dd4932a3caa
(calc-describe-bindings): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
57576
diff
changeset
|
678 ;; arch-tag: 2d347593-7591-449e-a64a-93dab5f2f686 |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
679 ;;; calc-help.el ends here |