calc-help.el 24 KB

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