Mercurial > emacs
annotate lisp/calc/calc-help.el @ 69180:9c5c44399069
(gdb-source-window): New variable.
Re-introduce the concept of a source window.
(gdb-get-buffer-create): Rename from gdb-get-create-buffer for
consistency with get-buffer-create.
(def-gdb-auto-update-handler, gdb-info-locals-handler)
(gdb-data-list-register-values-handler)
(gdb-stack-list-locals-handler): Try to preserve window-start as
well as window-point.
(gdb-display-source-buffer): New function (old concept).
(gdb-goto-breakpoint): Use it.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Mon, 27 Feb 2006 09:14:59 +0000 |
parents | 1028f625e637 |
children | 7a3f13e2dd57 c5406394f567 |
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 |
64325
1db49616ce05
Update copyright information.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
62489
diff
changeset
|
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, |
68636
6bf177f8065b
Update copyright year.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
64325
diff
changeset
|
4 ;; 2005, 2006 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...") | |
59501
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
181 (require 'info nil t) |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
182 (with-temp-buffer |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
183 (Info-mode) |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
184 (Info-goto-node "(Calc)Summary") |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
185 (goto-char (point-min)) |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
186 (forward-line 1) |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
187 (copy-to-buffer "*Calc Summary*" |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
188 (point) (point-max))) |
766a3686c3ae
(calc-describe-key): Use temporary info buffer to create a Calc
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58811
diff
changeset
|
189 (setq buffer-read-only t))) |
58811
b6f65248543d
Set calc-summary-indentation even when Calc Summary buffer exists.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58658
diff
changeset
|
190 (goto-char (point-min)) |
b6f65248543d
Set calc-summary-indentation even when Calc Summary buffer exists.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58658
diff
changeset
|
191 (setq case-fold-search nil) |
b6f65248543d
Set calc-summary-indentation even when Calc Summary buffer exists.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58658
diff
changeset
|
192 (re-search-forward "^\\(.*\\)\\[\\.\\. a b") |
b6f65248543d
Set calc-summary-indentation even when Calc Summary buffer exists.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58658
diff
changeset
|
193 (setq calc-summary-indentation |
b6f65248543d
Set calc-summary-indentation even when Calc Summary buffer exists.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58658
diff
changeset
|
194 (- (match-end 1) (match-beginning 1))) |
40785 | 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 | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
291 (string-match "[A-Z][A-Z][A-Z]" desc)))))) |
40785 | 292 |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
293 (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
|
294 "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
|
295 |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
296 (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
|
297 "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
|
298 |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
299 (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
|
300 "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
|
301 (let ((entrylist '()) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
302 entry) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
303 (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
|
304 (while indices |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
305 (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
|
306 (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
|
307 (Info-mode) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
308 (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
|
309 (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
|
310 (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
|
311 (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
|
312 (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
|
313 (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
|
314 (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
|
315 (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
|
316 (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
|
317 (error nil)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
318 (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
|
319 entrylist)) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
320 |
40785 | 321 (defun calc-describe-function (&optional func) |
322 (interactive) | |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
323 (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
|
324 (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
|
325 (calc-help-index-entries "Function" "Command"))) |
40785 | 326 (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
|
327 (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
|
328 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
|
329 nil t))) |
40785 | 330 (if (string-match "\\`calc-." func) |
331 (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
|
332 (calc-describe-thing func "Function Index"))) |
40785 | 333 |
334 (defun calc-describe-variable (&optional var) | |
335 (interactive) | |
57456
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
336 (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
|
337 (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
|
338 (calc-help-index-entries "Variable"))) |
40785 | 339 (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
|
340 (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
|
341 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
|
342 nil t))) |
cadf61c7f4eb
(calc-help-function-list, calc-help-variable-list): New variables.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57431
diff
changeset
|
343 (calc-describe-thing var "Variable Index")) |
40785 | 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))) | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
348 (calc-info-goto-node where) |
40785 | 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 | |
57431
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
359 (if Info-history |
eb0c890a4987
(calc-describe-copying, calc-describe-distribution, calc-describe-thing,
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
360 (Info-last)) |
40785 | 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 (or (let ((case-fold-search nil)) | |
366 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
367 (or target thing) | |
368 (or target thing) | |
369 (or target thing)) nil t) | |
370 (and not-quoted | |
371 (let ((case-fold-search t)) | |
372 (search-forward (or target thing) nil t))) | |
373 (search-forward (format "`%s'" (or target thing)) nil t) | |
374 (search-forward (or target thing) nil t))) | |
375 (let ((case-fold-search t)) | |
376 (or (search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'" | |
377 (or target thing) | |
378 (or target thing) | |
379 (or target thing)) nil t) | |
380 (search-forward (format "`%s'" (or target thing)) nil t) | |
381 (search-forward (or target thing) nil t)))) | |
382 (beginning-of-line) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
383 (message "Found `%s' in %s" thing where))) |
40785 | 384 |
385 (defun calc-view-news () | |
386 (interactive) | |
387 (let ((path load-path)) | |
388 (while (and path | |
389 (not (file-exists-p (expand-file-name "calc.el" (car path))))) | |
390 (setq path (cdr path))) | |
391 (or (and path | |
392 (file-exists-p (expand-file-name "README" (car path)))) | |
393 (error "Can't locate Calc sources")) | |
394 (calc-quit) | |
395 (switch-to-buffer "*Help*") | |
61831
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
396 (let ((inhibit-read-only t)) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
397 (erase-buffer) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
398 (insert-file-contents (expand-file-name "README" (car path))) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
399 (search-forward "Summary of changes") |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
400 (forward-line -1) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
401 (delete-region (point-min) (point)) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
402 (goto-char (point-min))) |
82f10a9c9eb3
(calc-view-news): Let-bind inhibit-read-only to t, use help-mode.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61146
diff
changeset
|
403 (help-mode))) |
40785 | 404 |
58551
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
405 (defvar calc-help-long-names '((?b . "binary/business") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
406 (?g . "graphics") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
407 (?j . "selection") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
408 (?k . "combinatorics/statistics") |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
409 (?u . "units/statistics"))) |
c38bc6b76926
(Info-history): Declare it.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57634
diff
changeset
|
410 |
40785 | 411 (defun calc-full-help () |
412 (interactive) | |
413 (with-output-to-temp-buffer "*Help*" | |
61095
0e536a451709
Update copyright date.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59815
diff
changeset
|
414 (princ (format "GNU Emacs Calculator version %s.\n" |
0e536a451709
Update copyright date.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59815
diff
changeset
|
415 calc-version)) |
61146
36733539e1c5
(calc-full-help): Remove email address.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61095
diff
changeset
|
416 (princ " By Dave Gillespie.\n") |
68638
1028f625e637
(calc-full-help): Update the copyright year.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
68636
diff
changeset
|
417 (princ " Copyright (C) 2006 Free Software Foundation, Inc.\n\n") |
40785 | 418 (princ "Type `h s' for a more detailed summary.\n") |
419 (princ "Or type `h i' to read the full Calc manual on-line.\n\n") | |
420 (princ "Basic keys:\n") | |
421 (let* ((calc-full-help-flag t)) | |
422 (mapcar (function (lambda (x) (princ (format " %s\n" x)))) | |
423 (nreverse (cdr (reverse (cdr (calc-help)))))) | |
424 (mapcar (function (lambda (prefix) | |
425 (let ((msgs (condition-case err | |
426 (funcall prefix) | |
427 (error nil)))) | |
428 (if (car msgs) | |
429 (princ | |
430 (if (eq (nth 2 msgs) ?v) | |
431 "\n`v' or `V' prefix (vector/matrix) keys: \n" | |
432 (if (nth 2 msgs) | |
433 (format | |
434 "\n`%c' prefix (%s) keys:\n" | |
435 (nth 2 msgs) | |
436 (or (cdr (assq (nth 2 msgs) | |
437 calc-help-long-names)) | |
438 (nth 1 msgs))) | |
439 (format "\n%s-modified keys:\n" | |
440 (capitalize (nth 1 msgs))))))) | |
441 (mapcar (function (lambda (x) | |
442 (princ (format " %s\n" x)))) | |
443 (car msgs))))) | |
444 '(calc-inverse-prefix-help | |
445 calc-hyperbolic-prefix-help | |
446 calc-inv-hyp-prefix-help | |
447 calc-a-prefix-help | |
448 calc-b-prefix-help | |
449 calc-c-prefix-help | |
450 calc-d-prefix-help | |
451 calc-f-prefix-help | |
452 calc-g-prefix-help | |
453 calc-h-prefix-help | |
454 calc-j-prefix-help | |
455 calc-k-prefix-help | |
456 calc-m-prefix-help | |
457 calc-r-prefix-help | |
458 calc-s-prefix-help | |
459 calc-t-prefix-help | |
460 calc-u-prefix-help | |
461 calc-v-prefix-help | |
462 calc-shift-Y-prefix-help | |
463 calc-shift-Z-prefix-help | |
464 calc-z-prefix-help))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
465 (print-help-return-message))) |
40785 | 466 |
467 (defun calc-h-prefix-help () | |
468 (interactive) | |
469 (calc-do-prefix-help | |
470 '("Help; Bindings; Info, Tutorial, Summary; News" | |
471 "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
|
472 "help" ?h)) |
40785 | 473 |
474 (defun calc-inverse-prefix-help () | |
475 (interactive) | |
476 (calc-do-prefix-help | |
477 '("I + S (arcsin), C (arccos), T (arctan); Q (square)" | |
478 "I + E (ln), L (exp), B (alog: B^X); f E (lnp1), f L (expm1)" | |
479 "I + F (ceiling), R (truncate); a S (invert func)" | |
480 "I + a m (match-not); c h (from-hms); k n (prev prime)" | |
481 "I + f G (gamma-Q); f e (erfc); k B (etc., lower-tail dists)" | |
482 "I + V S (reverse sort); V G (reverse grade)" | |
483 "I + v s (remove subvec); v h (tail)" | |
484 "I + t + (alt sum), t M (mean with error)" | |
485 "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
|
486 "inverse" nil)) |
40785 | 487 |
488 (defun calc-hyperbolic-prefix-help () | |
489 (interactive) | |
490 (calc-do-prefix-help | |
491 '("H + S (sinh), C (cosh), T (tanh); E (exp10), L (log10)" | |
492 "H + F (float floor), R (float round); P (constant \"e\")" | |
493 "H + a d (total derivative); k c (permutations)" | |
494 "H + k b (bern-poly), k e (euler-poly); k s (stirling-2)" | |
495 "H + f G (gamma-g), f B (beta-B); v h (rhead), v k (rcons)" | |
496 "H + v e (expand w/filler); V H (weighted histogram)" | |
497 "H + a S (general solve eqn), j I (general isolate)" | |
498 "H + a R (widen/root), a N (widen/min), a X (widen/max)" | |
499 "H + t M (median), t S (variance), t C (correlation coef)" | |
500 "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
|
501 "hyperbolic" nil)) |
40785 | 502 |
503 (defun calc-inv-hyp-prefix-help () | |
504 (interactive) | |
505 (calc-do-prefix-help | |
506 '("I H + S (arcsinh), C (arccosh), T (arctanh)" | |
507 "I H + E (log10), L (exp10); f G (gamma-G)" | |
508 "I H + F (float ceiling), R (float truncate)" | |
509 "I H + t S (pop variance)" | |
510 "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
|
511 "inverse-hyperbolic" nil)) |
40785 | 512 |
513 | |
514 (defun calc-f-prefix-help () | |
515 (interactive) | |
516 (calc-do-prefix-help | |
517 '("miN, maX; Hypot; Im, Re; Sign; [, ] (incr/decr)" | |
518 "Gamma, Beta, Erf, besselJ, besselY" | |
519 "SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2" | |
520 "SHIFT + Abssqr; Mantissa, eXponent, Scale" | |
521 "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
|
522 "functions" ?f)) |
40785 | 523 |
524 | |
525 (defun calc-s-prefix-help () | |
526 (interactive) | |
527 (calc-do-prefix-help | |
528 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)" | |
62489
8ccc946e6318
(calc-s-prefix-help): Add `calc-copy-special-constant' to help string.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
62442
diff
changeset
|
529 "Let; Copy, K=copy constant; Declare; Insert, Perm; Edit" |
40785 | 530 "Negate, +, -, *, /, ^, &, |, [, ]; Map" |
531 "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" | |
532 "SHIFT + LineStyles, PointStyles, plotRejects; Units" | |
533 "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
|
534 "store" ?s)) |
40785 | 535 |
536 (defun calc-r-prefix-help () | |
537 (interactive) | |
538 (calc-do-prefix-help | |
539 '("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
|
540 "recall" ?r)) |
40785 | 541 |
542 | |
543 (defun calc-j-prefix-help () | |
544 (interactive) | |
545 (calc-do-prefix-help | |
546 '("Select, Additional, Once; eVal, Formula; Rewrite" | |
547 "More, Less, 1-9, Next, Previous" | |
548 "Unselect, Clear; Display; Enable; Breakable" | |
549 "' (replace), ` (edit), +, -, *, /, RET (grab), DEL" | |
550 "SHIFT + swap: Left, Right; maybe: Select, Once" | |
551 "SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate" | |
552 "SHIFT + Negate, & (invert); Unpack") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
553 "select" ?j)) |
40785 | 554 |
555 | |
556 (defun calc-a-prefix-help () | |
557 (interactive) | |
558 (calc-do-prefix-help | |
559 '("Simplify, Extended-simplify, eVal; \" (exp-formula)" | |
560 "eXpand, Collect, Factor, Apart, Norm-rat" | |
561 "GCD, /, \\, % (polys); Polint" | |
562 "Derivative, Integral, Taylor; _ (subscr)" | |
563 "suBstitute; Rewrite, Match" | |
564 "SHIFT + Solve; Root, miN, maX; Poly-roots; Fit" | |
565 "SHIFT + Map; Tabulate, + (sum), * (prod); num-Integ" | |
566 "relations: =, # (not =), <, >, [ (< or =), ] (> or =)" | |
567 "logical: & (and), | (or), ! (not); : (if)" | |
568 "misc: { (in-set); . (rmeq)") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
569 "algebra" ?a)) |
40785 | 570 |
571 | |
572 (defun calc-b-prefix-help () | |
573 (interactive) | |
574 (calc-do-prefix-help | |
575 '("And, Or, Xor, Diff, Not; Wordsize, Clip" | |
576 "Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift" | |
577 "SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr" | |
578 "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
|
579 "binary/bus" ?b)) |
40785 | 580 |
581 | |
582 (defun calc-c-prefix-help () | |
583 (interactive) | |
584 (calc-do-prefix-help | |
585 '("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %" | |
586 "SHIFT + Fraction") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40785
diff
changeset
|
587 "convert" ?c)) |
40785 | 588 |
589 | |
590 (defun calc-d-prefix-help () | |
591 (interactive) | |
592 (calc-do-prefix-help | |
593 '("Group, \",\"; Normal, Fix, Sci, Eng, \".\"; Over" | |
594 "Radix, Zeros, 2, 8, 0, 6; Hms; Date; Complex, I, J" | |
595 "Why; Line-nums, line-Breaks; <, =, > (justify); Plain" | |
45580
955efae16491
(calc-d-prefix-help): Add `@'.
Miles Bader <miles@gnu.org>
parents:
41271
diff
changeset
|
596 "\" (strings); Truncate, [, ]; SPC (refresh), RET, @" |
40785 | 597 "SHIFT + language: Normal, One-line, Big, Unformatted" |
59815
4d497d47983e
(calc-d-prefix-help): Add LaTeX.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59501
diff
changeset
|
598 "SHIFT + language: C, Pascal, Fortran; TeX, LaTeX, Eqn" |
40785 | 599 "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
|
600 "display" ?d)) |
40785 | 601 |
602 | |
603 (defun calc-g-prefix-help () | |
604 (interactive) | |
605 (calc-do-prefix-help | |
606 '("Fast; Add, Delete, Juggle; Plot, Clear; Quit" | |
607 "Header, Name, Grid, Border, Key; View-commands, X-display" | |
608 "x-axis: Range, Title, Log, Zero; lineStyle" | |
609 "SHIFT + y-axis: Range, Title, Log, Zero; pointStyle" | |
610 "SHIFT + Print; Device, Output-file; X-geometry" | |
611 "SHIFT + Num-pts; Command, Kill, View-trail" | |
612 "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
|
613 "graph" ?g)) |
40785 | 614 |
615 | |
616 (defun calc-k-prefix-help () | |
617 (interactive) | |
618 (calc-do-prefix-help | |
619 '("GCD, LCM; Choose (binomial), Double-factorial" | |
620 "Random, random-Again, sHuffle" | |
621 "Factors, Prime-test, Next-prime, Totient, Moebius" | |
622 "Bernoulli, Euler, Stirling" | |
623 "SHIFT + Extended-gcd" | |
624 "SHIFT + dists: Binomial, Chi-square, F, Normal" | |
625 "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
|
626 "combinatorics" ?k)) |
40785 | 627 |
628 | |
629 (defun calc-m-prefix-help () | |
630 (interactive) | |
631 (calc-do-prefix-help | |
632 '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat" | |
62223
d47f288fcf69
(calc-m-prefix-help): Add mention of preserving embedded modes.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61831
diff
changeset
|
633 "Working; Xtensions; Mode-save; preserve Embedded modes" |
40785 | 634 "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" |
635 "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
|
636 "mode" ?m)) |
40785 | 637 |
638 | |
639 (defun calc-t-prefix-help () | |
640 (interactive) | |
641 (calc-do-prefix-help | |
642 '("Display; Fwd, Back; Next, Prev, Here, [, ]; Yank" | |
643 "Search, Rev; In, Out; <, >; Kill; Marker; . (abbrev)" | |
644 "SHIFT + time: Now; Part; Date, Julian, Unix, Czone" | |
645 "SHIFT + time: newWeek, newMonth, newYear; Incmonth" | |
646 "SHIFT + time: +, - (business days)" | |
647 "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
|
648 "trail/time" ?t)) |
40785 | 649 |
650 | |
651 (defun calc-u-prefix-help () | |
652 (interactive) | |
653 (calc-do-prefix-help | |
654 '("Simplify, Convert, Temperature-convert, Base-units" | |
655 "Autorange; Remove, eXtract; Explain; View-table; 0-9" | |
656 "Define, Undefine, Get-defn, Permanent" | |
657 "SHIFT + View-table-other-window" | |
658 "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" | |
659 "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
|
660 "units/stat" ?u)) |
40785 | 661 |
662 | |
663 (defun calc-v-prefix-help () | |
664 (interactive) | |
665 (calc-do-prefix-help | |
666 '("Pack, Unpack, Identity, Diagonal, indeX, Build" | |
667 "Row, Column, Subvector; Length; Find; Mask, Expand" | |
668 "Tranpose, Arrange, reVerse; Head, Kons; rNorm" | |
669 "SHIFT + Det, & (inverse), LUD, Trace, conJtrn, Cross" | |
670 "SHIFT + Sort, Grade, Histogram; cNorm" | |
671 "SHIFT + Apply, Map, Reduce, accUm, Inner-, Outer-prod" | |
672 "SHIFT + sets: V (union), ^ (intersection), - (diff)" | |
673 "SHIFT + sets: Xor, ~ (complement), Floor, Enum" | |
674 "SHIFT + sets: : (span), # (card), + (rdup)" | |
675 "<, =, > (justification); , (commas); [, {, ( (brackets)" | |
676 "} (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
|
677 "vec/mat" ?v)) |
40785 | 678 |
58658
8564d764ff4d
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58551
diff
changeset
|
679 (provide 'calc-help) |
8564d764ff4d
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58551
diff
changeset
|
680 |
57634
0dd4932a3caa
(calc-describe-bindings): Fix last change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
57576
diff
changeset
|
681 ;; 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
|
682 ;;; calc-help.el ends here |