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