1 |
;; Calculator for GNU Emacs, part II [calc-help.el] |
;; Calculator for GNU Emacs, part II [calc-help.el] |
2 |
;; Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
3 |
;; Written by Dave Gillespie, daveg@synaptics.com. |
;; Written by Dave Gillespie, daveg@synaptics.com. |
4 |
|
|
5 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
43 |
(message "") |
(message "") |
44 |
(if key |
(if key |
45 |
(call-interactively key) |
(call-interactively key) |
46 |
(beep))) |
(beep)))) |
|
) |
|
47 |
|
|
48 |
(defun calc-help-for-help (arg) |
(defun calc-help-for-help (arg) |
49 |
"You have typed `h', the Calc help character. Type a Help option: |
"You have typed `h', the Calc help character. Type a Help option: |
83 |
(calc-unread-command (cdr key)) |
(calc-unread-command (cdr key)) |
84 |
(calc-help-prefix nil)) |
(calc-help-prefix nil)) |
85 |
(let ((calc-dispatch-help t)) |
(let ((calc-dispatch-help t)) |
86 |
(calc-help-prefix arg))) |
(calc-help-prefix arg)))) |
|
) |
|
87 |
|
|
88 |
(defun calc-describe-copying () |
(defun calc-describe-copying () |
89 |
(interactive) |
(interactive) |
90 |
(calc-info) |
(calc-info) |
91 |
(Info-goto-node "Copying") |
(Info-goto-node "Copying")) |
|
) |
|
92 |
|
|
93 |
(defun calc-describe-distribution () |
(defun calc-describe-distribution () |
94 |
(interactive) |
(interactive) |
95 |
(calc-info) |
(calc-info) |
96 |
(Info-goto-node "Reporting Bugs") |
(Info-goto-node "Reporting Bugs")) |
|
) |
|
97 |
|
|
98 |
(defun calc-describe-no-warranty () |
(defun calc-describe-no-warranty () |
99 |
(interactive) |
(interactive) |
102 |
(let ((case-fold-search nil)) |
(let ((case-fold-search nil)) |
103 |
(search-forward " NO WARRANTY")) |
(search-forward " NO WARRANTY")) |
104 |
(beginning-of-line) |
(beginning-of-line) |
105 |
(recenter 0) |
(recenter 0)) |
|
) |
|
106 |
|
|
107 |
(defun calc-describe-bindings () |
(defun calc-describe-bindings () |
108 |
(interactive) |
(interactive) |
136 |
(delete-backward-char 1) |
(delete-backward-char 1) |
137 |
(delete-char 1) |
(delete-char 1) |
138 |
(insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) |
(insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) |
139 |
(goto-char (point-min))) |
(goto-char (point-min)))) |
|
) |
|
140 |
|
|
141 |
(defun calc-describe-key-briefly (key) |
(defun calc-describe-key-briefly (key) |
142 |
(interactive "kDescribe key briefly: ") |
(interactive "kDescribe key briefly: ") |
143 |
(calc-describe-key key t) |
(calc-describe-key key t)) |
|
) |
|
144 |
|
|
145 |
(defun calc-describe-key (key &optional briefly) |
(defun calc-describe-key (key &optional briefly) |
146 |
(interactive "kDescribe key: ") |
(interactive "kDescribe key: ") |
291 |
(if inv (setq desc (concat "I " desc))) |
(if inv (setq desc (concat "I " desc))) |
292 |
(if hyp (setq desc (concat "H " desc))) |
(if hyp (setq desc (concat "H " desc))) |
293 |
(calc-describe-thing desc "Key Index" nil |
(calc-describe-thing desc "Key Index" nil |
294 |
(string-match "[A-Z][A-Z][A-Z]" desc))))) |
(string-match "[A-Z][A-Z][A-Z]" desc)))))) |
|
) |
|
295 |
|
|
296 |
(defun calc-describe-function (&optional func) |
(defun calc-describe-function (&optional func) |
297 |
(interactive) |
(interactive) |
304 |
(calc-describe-thing (if (string-match "\\`calcFunc-." func) |
(calc-describe-thing (if (string-match "\\`calcFunc-." func) |
305 |
(substring func 9) |
(substring func 9) |
306 |
func) |
func) |
307 |
"Function Index")) |
"Function Index"))) |
|
) |
|
308 |
|
|
309 |
(defun calc-describe-variable (&optional var) |
(defun calc-describe-variable (&optional var) |
310 |
(interactive) |
(interactive) |
315 |
(calc-describe-thing var "Variable Index" |
(calc-describe-thing var "Variable Index" |
316 |
(if (string-match "\\`var-." var) |
(if (string-match "\\`var-." var) |
317 |
(substring var 4) |
(substring var 4) |
318 |
var)) |
var))) |
|
) |
|
319 |
|
|
320 |
(defun calc-describe-thing (thing where &optional target not-quoted) |
(defun calc-describe-thing (thing where &optional target not-quoted) |
321 |
(message "Looking for `%s' in %s..." thing where) |
(message "Looking for `%s' in %s..." thing where) |
355 |
(search-forward (format "`%s'" (or target thing)) nil t) |
(search-forward (format "`%s'" (or target thing)) nil t) |
356 |
(search-forward (or target thing) nil t)))) |
(search-forward (or target thing) nil t)))) |
357 |
(beginning-of-line) |
(beginning-of-line) |
358 |
(message "Found `%s' in %s" thing where)) |
(message "Found `%s' in %s" thing where))) |
|
) |
|
359 |
|
|
360 |
(defun calc-view-news () |
(defun calc-view-news () |
361 |
(interactive) |
(interactive) |
373 |
(search-forward "Summary of changes") |
(search-forward "Summary of changes") |
374 |
(forward-line -1) |
(forward-line -1) |
375 |
(delete-region (point-min) (point)) |
(delete-region (point-min) (point)) |
376 |
(goto-char (point-min))) |
(goto-char (point-min)))) |
|
) |
|
|
|
|
|
|
|
377 |
|
|
378 |
(defun calc-full-help () |
(defun calc-full-help () |
379 |
(interactive) |
(interactive) |
430 |
calc-shift-Y-prefix-help |
calc-shift-Y-prefix-help |
431 |
calc-shift-Z-prefix-help |
calc-shift-Z-prefix-help |
432 |
calc-z-prefix-help))) |
calc-z-prefix-help))) |
433 |
(print-help-return-message)) |
(print-help-return-message))) |
|
) |
|
434 |
|
|
435 |
(defvar calc-help-long-names '( ( ?b . "binary/business" ) |
(defvar calc-help-long-names '((?b . "binary/business") |
436 |
( ?g . "graphics" ) |
(?g . "graphics") |
437 |
( ?j . "selection" ) |
(?j . "selection") |
438 |
( ?k . "combinatorics/statistics" ) |
(?k . "combinatorics/statistics") |
439 |
( ?u . "units/statistics" ) |
(?u . "units/statistics"))) |
|
)) |
|
440 |
|
|
441 |
(defun calc-h-prefix-help () |
(defun calc-h-prefix-help () |
442 |
(interactive) |
(interactive) |
443 |
(calc-do-prefix-help |
(calc-do-prefix-help |
444 |
'("Help; Bindings; Info, Tutorial, Summary; News" |
'("Help; Bindings; Info, Tutorial, Summary; News" |
445 |
"describe: Key, C (briefly), Function, Variable") |
"describe: Key, C (briefly), Function, Variable") |
446 |
"help" ?h) |
"help" ?h)) |
|
) |
|
447 |
|
|
448 |
(defun calc-inverse-prefix-help () |
(defun calc-inverse-prefix-help () |
449 |
(interactive) |
(interactive) |
457 |
"I + v s (remove subvec); v h (tail)" |
"I + v s (remove subvec); v h (tail)" |
458 |
"I + t + (alt sum), t M (mean with error)" |
"I + t + (alt sum), t M (mean with error)" |
459 |
"I + t S (pop std dev), t C (pop covar)") |
"I + t S (pop std dev), t C (pop covar)") |
460 |
"inverse" nil) |
"inverse" nil)) |
|
) |
|
461 |
|
|
462 |
(defun calc-hyperbolic-prefix-help () |
(defun calc-hyperbolic-prefix-help () |
463 |
(interactive) |
(interactive) |
472 |
"H + a R (widen/root), a N (widen/min), a X (widen/max)" |
"H + a R (widen/root), a N (widen/min), a X (widen/max)" |
473 |
"H + t M (median), t S (variance), t C (correlation coef)" |
"H + t M (median), t S (variance), t C (correlation coef)" |
474 |
"H + c f/F/c (pervasive float/frac/clean)") |
"H + c f/F/c (pervasive float/frac/clean)") |
475 |
"hyperbolic" nil) |
"hyperbolic" nil)) |
|
) |
|
476 |
|
|
477 |
(defun calc-inv-hyp-prefix-help () |
(defun calc-inv-hyp-prefix-help () |
478 |
(interactive) |
(interactive) |
482 |
"I H + F (float ceiling), R (float truncate)" |
"I H + F (float ceiling), R (float truncate)" |
483 |
"I H + t S (pop variance)" |
"I H + t S (pop variance)" |
484 |
"I H + a S (general invert func); v h (rtail)") |
"I H + a S (general invert func); v h (rtail)") |
485 |
"inverse-hyperbolic" nil) |
"inverse-hyperbolic" nil)) |
|
) |
|
486 |
|
|
487 |
|
|
488 |
(defun calc-f-prefix-help () |
(defun calc-f-prefix-help () |
493 |
"SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2" |
"SHIFT + int-sQrt; Int-log, Exp(x)-1, Ln(x+1); arcTan2" |
494 |
"SHIFT + Abssqr; Mantissa, eXponent, Scale" |
"SHIFT + Abssqr; Mantissa, eXponent, Scale" |
495 |
"SHIFT + incomplete: Gamma-P, Beta-I") |
"SHIFT + incomplete: Gamma-P, Beta-I") |
496 |
"functions" ?f) |
"functions" ?f)) |
|
) |
|
497 |
|
|
498 |
|
|
499 |
(defun calc-s-prefix-help () |
(defun calc-s-prefix-help () |
505 |
"SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" |
"SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" |
506 |
"SHIFT + LineStyles, PointStyles, plotRejects; Units" |
"SHIFT + LineStyles, PointStyles, plotRejects; Units" |
507 |
"SHIFT + Eval-, AlgSimp-, ExtSimp-, FitRules") |
"SHIFT + Eval-, AlgSimp-, ExtSimp-, FitRules") |
508 |
"store" ?s) |
"store" ?s)) |
|
) |
|
509 |
|
|
510 |
(defun calc-r-prefix-help () |
(defun calc-r-prefix-help () |
511 |
(interactive) |
(interactive) |
512 |
(calc-do-prefix-help |
(calc-do-prefix-help |
513 |
'("digits 0-9: recall, same as `s r 0-9'") |
'("digits 0-9: recall, same as `s r 0-9'") |
514 |
"recall" ?r) |
"recall" ?r)) |
|
) |
|
515 |
|
|
516 |
|
|
517 |
(defun calc-j-prefix-help () |
(defun calc-j-prefix-help () |
524 |
"SHIFT + swap: Left, Right; maybe: Select, Once" |
"SHIFT + swap: Left, Right; maybe: Select, Once" |
525 |
"SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate" |
"SHIFT + Commute, Merge, Distrib, jump-Eqn, Isolate" |
526 |
"SHIFT + Negate, & (invert); Unpack") |
"SHIFT + Negate, & (invert); Unpack") |
527 |
"select" ?j) |
"select" ?j)) |
|
) |
|
528 |
|
|
529 |
|
|
530 |
(defun calc-a-prefix-help () |
(defun calc-a-prefix-help () |
540 |
"relations: =, # (not =), <, >, [ (< or =), ] (> or =)" |
"relations: =, # (not =), <, >, [ (< or =), ] (> or =)" |
541 |
"logical: & (and), | (or), ! (not); : (if)" |
"logical: & (and), | (or), ! (not); : (if)" |
542 |
"misc: { (in-set); . (rmeq)") |
"misc: { (in-set); . (rmeq)") |
543 |
"algebra" ?a) |
"algebra" ?a)) |
|
) |
|
544 |
|
|
545 |
|
|
546 |
(defun calc-b-prefix-help () |
(defun calc-b-prefix-help () |
550 |
"Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift" |
"Lshift, Rshift, roTate; SHIFT + signed Lshift, Rshift" |
551 |
"SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr" |
"SHIFT + business: Pv, Npv, Fv, pMt, #pmts, raTe, Irr" |
552 |
"SHIFT + business: Sln, sYd, Ddb; %ch") |
"SHIFT + business: Sln, sYd, Ddb; %ch") |
553 |
"binary/bus" ?b) |
"binary/bus" ?b)) |
|
) |
|
554 |
|
|
555 |
|
|
556 |
(defun calc-c-prefix-help () |
(defun calc-c-prefix-help () |
558 |
(calc-do-prefix-help |
(calc-do-prefix-help |
559 |
'("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %" |
'("Deg, Rad, HMS; Float; Polar/rect; Clean, 0-9; %" |
560 |
"SHIFT + Fraction") |
"SHIFT + Fraction") |
561 |
"convert" ?c) |
"convert" ?c)) |
|
) |
|
562 |
|
|
563 |
|
|
564 |
(defun calc-d-prefix-help () |
(defun calc-d-prefix-help () |
571 |
"SHIFT + language: Normal, One-line, Big, Unformatted" |
"SHIFT + language: Normal, One-line, Big, Unformatted" |
572 |
"SHIFT + language: C, Pascal, Fortran; TeX, Eqn" |
"SHIFT + language: C, Pascal, Fortran; TeX, Eqn" |
573 |
"SHIFT + language: Mathematica, W=Maple") |
"SHIFT + language: Mathematica, W=Maple") |
574 |
"display" ?d) |
"display" ?d)) |
|
) |
|
575 |
|
|
576 |
|
|
577 |
(defun calc-g-prefix-help () |
(defun calc-g-prefix-help () |
584 |
"SHIFT + Print; Device, Output-file; X-geometry" |
"SHIFT + Print; Device, Output-file; X-geometry" |
585 |
"SHIFT + Num-pts; Command, Kill, View-trail" |
"SHIFT + Num-pts; Command, Kill, View-trail" |
586 |
"SHIFT + 3d: Fast, Add; CTRL + z-axis: Range, Title, Log") |
"SHIFT + 3d: Fast, Add; CTRL + z-axis: Range, Title, Log") |
587 |
"graph" ?g) |
"graph" ?g)) |
|
) |
|
588 |
|
|
589 |
|
|
590 |
(defun calc-k-prefix-help () |
(defun calc-k-prefix-help () |
597 |
"SHIFT + Extended-gcd" |
"SHIFT + Extended-gcd" |
598 |
"SHIFT + dists: Binomial, Chi-square, F, Normal" |
"SHIFT + dists: Binomial, Chi-square, F, Normal" |
599 |
"SHIFT + dists: Poisson, student's-T") |
"SHIFT + dists: Poisson, student's-T") |
600 |
"combinatorics" ?k) |
"combinatorics" ?k)) |
|
) |
|
601 |
|
|
602 |
|
|
603 |
(defun calc-m-prefix-help () |
(defun calc-m-prefix-help () |
607 |
"Working; Xtensions; Mode-save" |
"Working; Xtensions; Mode-save" |
608 |
"SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" |
"SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute" |
609 |
"SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units") |
"SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units") |
610 |
"mode" ?m) |
"mode" ?m)) |
|
) |
|
611 |
|
|
612 |
|
|
613 |
(defun calc-t-prefix-help () |
(defun calc-t-prefix-help () |
619 |
"SHIFT + time: newWeek, newMonth, newYear; Incmonth" |
"SHIFT + time: newWeek, newMonth, newYear; Incmonth" |
620 |
"SHIFT + time: +, - (business days)" |
"SHIFT + time: +, - (business days)" |
621 |
"digits 0-9: store-to, same as `s t 0-9'") |
"digits 0-9: store-to, same as `s t 0-9'") |
622 |
"trail/time" ?t) |
"trail/time" ?t)) |
|
) |
|
623 |
|
|
624 |
|
|
625 |
(defun calc-u-prefix-help () |
(defun calc-u-prefix-help () |
631 |
"SHIFT + View-table-other-window" |
"SHIFT + View-table-other-window" |
632 |
"SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" |
"SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" |
633 |
"SHIFT + stat: + (sum), - (asum), * (prod), # (count)") |
"SHIFT + stat: + (sum), - (asum), * (prod), # (count)") |
634 |
"units/stat" ?u) |
"units/stat" ?u)) |
|
) |
|
635 |
|
|
636 |
|
|
637 |
(defun calc-v-prefix-help () |
(defun calc-v-prefix-help () |
648 |
"SHIFT + sets: : (span), # (card), + (rdup)" |
"SHIFT + sets: : (span), # (card), + (rdup)" |
649 |
"<, =, > (justification); , (commas); [, {, ( (brackets)" |
"<, =, > (justification); , (commas); [, {, ( (brackets)" |
650 |
"} (matrix brackets); . (abbreviate); / (multi-lines)") |
"} (matrix brackets); . (abbreviate); / (multi-lines)") |
651 |
"vec/mat" ?v) |
"vec/mat" ?v)) |
|
) |
|
652 |
|
|
653 |
|
;;; calc-help.el ends here |