calc-help.el 24 KB

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