diff options
| author | Jay Belanger | 2005-11-28 22:15:24 +0000 |
|---|---|---|
| committer | Jay Belanger | 2005-11-28 22:15:24 +0000 |
| commit | 58547c3ecae5aa70e666a5813e1fc652fd1b376f (patch) | |
| tree | 57572b97b4f5eb4804c52aaa869ed00c209e4bd9 | |
| parent | 346bffae0cdf7aaebafbed6108fd782f3f2c738f (diff) | |
| download | emacs-58547c3ecae5aa70e666a5813e1fc652fd1b376f.tar.gz emacs-58547c3ecae5aa70e666a5813e1fc652fd1b376f.zip | |
Changed references to `M-#' to new prefix.
| -rw-r--r-- | man/calc.texi | 671 |
1 files changed, 334 insertions, 337 deletions
diff --git a/man/calc.texi b/man/calc.texi index 726a7bc7a0c..5eab5322fca 100644 --- a/man/calc.texi +++ b/man/calc.texi | |||
| @@ -167,7 +167,7 @@ longer Info tutorial.) | |||
| 167 | * Embedded Mode:: Working with formulas embedded in a file. | 167 | * Embedded Mode:: Working with formulas embedded in a file. |
| 168 | * Programming:: Calc as a programmable calculator. | 168 | * Programming:: Calc as a programmable calculator. |
| 169 | 169 | ||
| 170 | * Customizable Variables:: Customizable Variables. | 170 | * Customizing Calc:: Customizing Calc. |
| 171 | * Reporting Bugs:: How to report bugs and make suggestions. | 171 | * Reporting Bugs:: How to report bugs and make suggestions. |
| 172 | 172 | ||
| 173 | * Summary:: Summary of Calc commands and functions. | 173 | * Summary:: Summary of Calc commands and functions. |
| @@ -708,9 +708,9 @@ in the margin with its index entry. | |||
| 708 | @c [fix-ref Help Commands] | 708 | @c [fix-ref Help Commands] |
| 709 | You can access this manual on-line at any time within Calc by | 709 | You can access this manual on-line at any time within Calc by |
| 710 | pressing the @kbd{h i} key sequence. Outside of the Calc window, | 710 | pressing the @kbd{h i} key sequence. Outside of the Calc window, |
| 711 | you can press @kbd{M-# i} to read the manual on-line. Also, you | 711 | you can press @kbd{C-x * i} to read the manual on-line. Also, you |
| 712 | can jump directly to the Tutorial by pressing @kbd{h t} or @kbd{M-# t}, | 712 | can jump directly to the Tutorial by pressing @kbd{h t} or @kbd{C-x * t}, |
| 713 | or to the Summary by pressing @kbd{h s} or @kbd{M-# s}. Within Calc, | 713 | or to the Summary by pressing @kbd{h s} or @kbd{C-x * s}. Within Calc, |
| 714 | you can also go to the part of the manual describing any Calc key, | 714 | you can also go to the part of the manual describing any Calc key, |
| 715 | function, or variable using @w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, | 715 | function, or variable using @w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, |
| 716 | respectively. @xref{Help Commands}. | 716 | respectively. @xref{Help Commands}. |
| @@ -773,8 +773,8 @@ that you must press @key{RET} to proceed. For example, the @key{RET} | |||
| 773 | is usually omitted in key sequences like @kbd{M-x calc-keypad @key{RET}}. | 773 | is usually omitted in key sequences like @kbd{M-x calc-keypad @key{RET}}. |
| 774 | 774 | ||
| 775 | Commands are generally shown like this: @kbd{p} (@code{calc-precision}) | 775 | Commands are generally shown like this: @kbd{p} (@code{calc-precision}) |
| 776 | or @kbd{M-# k} (@code{calc-keypad}). This means that the command is | 776 | or @kbd{C-x * k} (@code{calc-keypad}). This means that the command is |
| 777 | normally used by pressing the @kbd{p} key or @kbd{M-# k} key sequence, | 777 | normally used by pressing the @kbd{p} key or @kbd{C-x * k} key sequence, |
| 778 | but it also has the full-name equivalent shown, e.g., @kbd{M-x calc-precision}. | 778 | but it also has the full-name equivalent shown, e.g., @kbd{M-x calc-precision}. |
| 779 | 779 | ||
| 780 | Commands that correspond to functions in algebraic notation | 780 | Commands that correspond to functions in algebraic notation |
| @@ -797,7 +797,7 @@ everything you see here will be covered more thoroughly in the | |||
| 797 | Tutorial. | 797 | Tutorial. |
| 798 | 798 | ||
| 799 | To begin, start Emacs if necessary (usually the command @code{emacs} | 799 | To begin, start Emacs if necessary (usually the command @code{emacs} |
| 800 | does this), and type @kbd{M-# c} (or @kbd{@key{ESC} # c}) to start the | 800 | does this), and type @kbd{C-x * c} to start the |
| 801 | Calculator. (You can also use @kbd{M-x calc} if this doesn't work. | 801 | Calculator. (You can also use @kbd{M-x calc} if this doesn't work. |
| 802 | @xref{Starting Calc}, for various ways of starting the Calculator.) | 802 | @xref{Starting Calc}, for various ways of starting the Calculator.) |
| 803 | 803 | ||
| @@ -849,7 +849,7 @@ Type @kbd{' arcsinh($ - $$) @key{RET}} to subtract the second-most-recent | |||
| 849 | result from the most-recent and compute the Inverse Hyperbolic sine. | 849 | result from the most-recent and compute the Inverse Hyperbolic sine. |
| 850 | 850 | ||
| 851 | @strong{Keypad mode.} If you are using the X window system, press | 851 | @strong{Keypad mode.} If you are using the X window system, press |
| 852 | @w{@kbd{M-# k}} to get Keypad mode. (If you don't use X, skip to | 852 | @w{@kbd{C-x * k}} to get Keypad mode. (If you don't use X, skip to |
| 853 | the next section.) | 853 | the next section.) |
| 854 | 854 | ||
| 855 | @noindent | 855 | @noindent |
| @@ -869,12 +869,12 @@ Click on @key{-}, @key{INV}, @key{HYP}, and @key{SIN}. | |||
| 869 | Click on @key{<-} to erase the result, then click @key{OFF} to turn | 869 | Click on @key{<-} to erase the result, then click @key{OFF} to turn |
| 870 | the Keypad Calculator off. | 870 | the Keypad Calculator off. |
| 871 | 871 | ||
| 872 | @strong{Grabbing data.} Type @kbd{M-# x} if necessary to exit Calc. | 872 | @strong{Grabbing data.} Type @kbd{C-x * x} if necessary to exit Calc. |
| 873 | Now select the following numbers as an Emacs region: ``Mark'' the | 873 | Now select the following numbers as an Emacs region: ``Mark'' the |
| 874 | front of the list by typing @kbd{C-@key{SPC}} or @kbd{C-@@} there, | 874 | front of the list by typing @kbd{C-@key{SPC}} or @kbd{C-@@} there, |
| 875 | then move to the other end of the list. (Either get this list from | 875 | then move to the other end of the list. (Either get this list from |
| 876 | the on-line copy of this manual, accessed by @w{@kbd{M-# i}}, or just | 876 | the on-line copy of this manual, accessed by @w{@kbd{C-x * i}}, or just |
| 877 | type these numbers into a scratch file.) Now type @kbd{M-# g} to | 877 | type these numbers into a scratch file.) Now type @kbd{C-x * g} to |
| 878 | ``grab'' these numbers into Calc. | 878 | ``grab'' these numbers into Calc. |
| 879 | 879 | ||
| 880 | @example | 880 | @example |
| @@ -896,7 +896,7 @@ the product of the numbers. | |||
| 896 | @noindent | 896 | @noindent |
| 897 | You can also grab data as a rectangular matrix. Place the cursor on | 897 | You can also grab data as a rectangular matrix. Place the cursor on |
| 898 | the upper-leftmost @samp{1} and set the mark, then move to just after | 898 | the upper-leftmost @samp{1} and set the mark, then move to just after |
| 899 | the lower-right @samp{8} and press @kbd{M-# r}. | 899 | the lower-right @samp{8} and press @kbd{C-x * r}. |
| 900 | 900 | ||
| 901 | @noindent | 901 | @noindent |
| 902 | Type @kbd{v t} to transpose this | 902 | Type @kbd{v t} to transpose this |
| @@ -908,7 +908,7 @@ matrix into a | |||
| 908 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate | 908 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate |
| 909 | vectors. Now type @w{@kbd{V R + @key{TAB} V R +}} to compute the sums | 909 | vectors. Now type @w{@kbd{V R + @key{TAB} V R +}} to compute the sums |
| 910 | of the two original columns. (There is also a special | 910 | of the two original columns. (There is also a special |
| 911 | grab-and-sum-columns command, @kbd{M-# :}.) | 911 | grab-and-sum-columns command, @kbd{C-x * :}.) |
| 912 | 912 | ||
| 913 | @strong{Units conversion.} Units are entered algebraically. | 913 | @strong{Units conversion.} Units are entered algebraically. |
| 914 | Type @w{@kbd{' 43 mi/hr @key{RET}}} to enter the quantity 43 miles-per-hour. | 914 | Type @w{@kbd{' 43 mi/hr @key{RET}}} to enter the quantity 43 miles-per-hour. |
| @@ -939,21 +939,21 @@ Type @kbd{7.5}, then @kbd{s l a @key{RET}} to let @expr{a = 7.5} in these formul | |||
| 939 | 939 | ||
| 940 | @iftex | 940 | @iftex |
| 941 | @strong{Help functions.} You can read about any command in the on-line | 941 | @strong{Help functions.} You can read about any command in the on-line |
| 942 | manual. Type @kbd{M-# c} to return to Calc after each of these | 942 | manual. Type @kbd{C-x * c} to return to Calc after each of these |
| 943 | commands: @kbd{h k t N} to read about the @kbd{t N} command, | 943 | commands: @kbd{h k t N} to read about the @kbd{t N} command, |
| 944 | @kbd{h f sqrt @key{RET}} to read about the @code{sqrt} function, and | 944 | @kbd{h f sqrt @key{RET}} to read about the @code{sqrt} function, and |
| 945 | @kbd{h s} to read the Calc summary. | 945 | @kbd{h s} to read the Calc summary. |
| 946 | @end iftex | 946 | @end iftex |
| 947 | @ifinfo | 947 | @ifinfo |
| 948 | @strong{Help functions.} You can read about any command in the on-line | 948 | @strong{Help functions.} You can read about any command in the on-line |
| 949 | manual. Remember to type the letter @kbd{l}, then @kbd{M-# c}, to | 949 | manual. Remember to type the letter @kbd{l}, then @kbd{C-x * c}, to |
| 950 | return here after each of these commands: @w{@kbd{h k t N}} to read | 950 | return here after each of these commands: @w{@kbd{h k t N}} to read |
| 951 | about the @w{@kbd{t N}} command, @kbd{h f sqrt @key{RET}} to read about the | 951 | about the @w{@kbd{t N}} command, @kbd{h f sqrt @key{RET}} to read about the |
| 952 | @code{sqrt} function, and @kbd{h s} to read the Calc summary. | 952 | @code{sqrt} function, and @kbd{h s} to read the Calc summary. |
| 953 | @end ifinfo | 953 | @end ifinfo |
| 954 | 954 | ||
| 955 | Press @key{DEL} repeatedly to remove any leftover results from the stack. | 955 | Press @key{DEL} repeatedly to remove any leftover results from the stack. |
| 956 | To exit from Calc, press @kbd{q} or @kbd{M-# c} again. | 956 | To exit from Calc, press @kbd{q} or @kbd{C-x * c} again. |
| 957 | 957 | ||
| 958 | @node Using Calc, History and Acknowledgements, Demonstration of Calc, Getting Started | 958 | @node Using Calc, History and Acknowledgements, Demonstration of Calc, Getting Started |
| 959 | @section Using Calc | 959 | @section Using Calc |
| @@ -970,54 +970,38 @@ there are Quick mode, Keypad mode, and Embedded mode. | |||
| 970 | * Keypad Mode Overview:: | 970 | * Keypad Mode Overview:: |
| 971 | * Standalone Operation:: | 971 | * Standalone Operation:: |
| 972 | * Embedded Mode Overview:: | 972 | * Embedded Mode Overview:: |
| 973 | * Other M-# Commands:: | 973 | * Other C-x * Commands:: |
| 974 | @end menu | 974 | @end menu |
| 975 | 975 | ||
| 976 | @node Starting Calc, The Standard Interface, Using Calc, Using Calc | 976 | @node Starting Calc, The Standard Interface, Using Calc, Using Calc |
| 977 | @subsection Starting Calc | 977 | @subsection Starting Calc |
| 978 | 978 | ||
| 979 | @noindent | 979 | @noindent |
| 980 | On most systems, you can type @kbd{M-#} to start the Calculator. | 980 | On most systems, you can type @kbd{C-x *} to start the Calculator. |
| 981 | The notation @kbd{M-#} is short for Meta-@kbd{#}. On most | 981 | The key sequence @kbd{C-x *} is bound to the command @code{calc-dispatch}, |
| 982 | keyboards this means holding down the Meta (or Alt) and | 982 | which can be rebound if convenient (@pxref{Customizing Calc}). |
| 983 | Shift keys while typing @kbd{3}. | ||
| 984 | 983 | ||
| 985 | @cindex META key | 984 | When you press @kbd{C-x *}, Emacs waits for you to press a second key to |
| 986 | Once again, if you don't have a Meta key on your keyboard you can type | 985 | complete the command. In this case, you will follow @kbd{C-x *} with a |
| 987 | @key{ESC} first, then @kbd{#}, to accomplish the same thing. If you | 986 | letter (upper- or lower-case, it doesn't matter for @kbd{C-x *}) that says |
| 988 | don't even have an @key{ESC} key, you can fake it by holding down | ||
| 989 | Control or @key{CTRL} while typing a left square bracket | ||
| 990 | (that's @kbd{C-[} in Emacs notation). | ||
| 991 | |||
| 992 | The key @kbd{M-#} is bound to the command @code{calc-dispatch}, | ||
| 993 | which can be rebound if convenient. | ||
| 994 | (@xref{Key Bindings,,Customizing Key Bindings,emacs, | ||
| 995 | The GNU Emacs Manual}.) | ||
| 996 | |||
| 997 | When you press @kbd{M-#}, Emacs waits for you to press a second key to | ||
| 998 | complete the command. In this case, you will follow @kbd{M-#} with a | ||
| 999 | letter (upper- or lower-case, it doesn't matter for @kbd{M-#}) that says | ||
| 1000 | which Calc interface you want to use. | 987 | which Calc interface you want to use. |
| 1001 | 988 | ||
| 1002 | To get Calc's standard interface, type @kbd{M-# c}. To get | 989 | To get Calc's standard interface, type @kbd{C-x * c}. To get |
| 1003 | Keypad mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief | 990 | Keypad mode, type @kbd{C-x * k}. Type @kbd{C-x * ?} to get a brief |
| 1004 | list of the available options, and type a second @kbd{?} to get | 991 | list of the available options, and type a second @kbd{?} to get |
| 1005 | a complete list. | 992 | a complete list. |
| 1006 | 993 | ||
| 1007 | To ease typing, @kbd{M-# M-#} (or @kbd{M-# #} if that's easier) | 994 | To ease typing, @kbd{C-x * *} also works to start Calc. It starts the |
| 1008 | also works to start Calc. It starts the same interface (either | 995 | same interface (either @kbd{C-x * c} or @w{@kbd{C-x * k}}) that you last |
| 1009 | @kbd{M-# c} or @w{@kbd{M-# k}}) that you last used, selecting the | 996 | used, selecting the @kbd{C-x * c} interface by default. |
| 1010 | @kbd{M-# c} interface by default. (If your installation has | ||
| 1011 | a special function key set up to act like @kbd{M-#}, hitting that | ||
| 1012 | function key twice is just like hitting @kbd{M-# M-#}.) | ||
| 1013 | 997 | ||
| 1014 | If @kbd{M-#} doesn't work for you, you can always type explicit | 998 | If @kbd{C-x *} doesn't work for you, you can always type explicit |
| 1015 | commands like @kbd{M-x calc} (for the standard user interface) or | 999 | commands like @kbd{M-x calc} (for the standard user interface) or |
| 1016 | @w{@kbd{M-x calc-keypad}} (for Keypad mode). First type @kbd{M-x} | 1000 | @w{@kbd{M-x calc-keypad}} (for Keypad mode). First type @kbd{M-x} |
| 1017 | (that's Meta with the letter @kbd{x}), then, at the prompt, | 1001 | (that's Meta with the letter @kbd{x}), then, at the prompt, |
| 1018 | type the full command (like @kbd{calc-keypad}) and press Return. | 1002 | type the full command (like @kbd{calc-keypad}) and press Return. |
| 1019 | 1003 | ||
| 1020 | The same commands (like @kbd{M-# c} or @kbd{M-# M-#}) that start | 1004 | The same commands (like @kbd{C-x * c} or @kbd{C-x * *}) that start |
| 1021 | the Calculator also turn it off if it is already on. | 1005 | the Calculator also turn it off if it is already on. |
| 1022 | 1006 | ||
| 1023 | @node The Standard Interface, Quick Mode Overview, Starting Calc, Using Calc | 1007 | @node The Standard Interface, Quick Mode Overview, Starting Calc, Using Calc |
| @@ -1026,7 +1010,7 @@ the Calculator also turn it off if it is already on. | |||
| 1026 | @noindent | 1010 | @noindent |
| 1027 | @cindex Standard user interface | 1011 | @cindex Standard user interface |
| 1028 | Calc's standard interface acts like a traditional RPN calculator, | 1012 | Calc's standard interface acts like a traditional RPN calculator, |
| 1029 | operated by the normal Emacs keyboard. When you type @kbd{M-# c} | 1013 | operated by the normal Emacs keyboard. When you type @kbd{C-x * c} |
| 1030 | to start the Calculator, the Emacs screen splits into two windows | 1014 | to start the Calculator, the Emacs screen splits into two windows |
| 1031 | with the file you were editing on top and Calc on the bottom. | 1015 | with the file you were editing on top and Calc on the bottom. |
| 1032 | 1016 | ||
| @@ -1082,55 +1066,55 @@ inside a regular window, Emacs acts just like normal. When the | |||
| 1082 | cursor is in the Calc stack or trail windows, keys are interpreted | 1066 | cursor is in the Calc stack or trail windows, keys are interpreted |
| 1083 | as Calc commands. | 1067 | as Calc commands. |
| 1084 | 1068 | ||
| 1085 | When you quit by pressing @kbd{M-# c} a second time, the Calculator | 1069 | When you quit by pressing @kbd{C-x * c} a second time, the Calculator |
| 1086 | windows go away but the actual Stack and Trail are not gone, just | 1070 | windows go away but the actual Stack and Trail are not gone, just |
| 1087 | hidden. When you press @kbd{M-# c} once again you will get the | 1071 | hidden. When you press @kbd{C-x * c} once again you will get the |
| 1088 | same stack and trail contents you had when you last used the | 1072 | same stack and trail contents you had when you last used the |
| 1089 | Calculator. | 1073 | Calculator. |
| 1090 | 1074 | ||
| 1091 | The Calculator does not remember its state between Emacs sessions. | 1075 | The Calculator does not remember its state between Emacs sessions. |
| 1092 | Thus if you quit Emacs and start it again, @kbd{M-# c} will give you | 1076 | Thus if you quit Emacs and start it again, @kbd{C-x * c} will give you |
| 1093 | a fresh stack and trail. There is a command (@kbd{m m}) that lets | 1077 | a fresh stack and trail. There is a command (@kbd{m m}) that lets |
| 1094 | you save your favorite mode settings between sessions, though. | 1078 | you save your favorite mode settings between sessions, though. |
| 1095 | One of the things it saves is which user interface (standard or | 1079 | One of the things it saves is which user interface (standard or |
| 1096 | Keypad) you last used; otherwise, a freshly started Emacs will | 1080 | Keypad) you last used; otherwise, a freshly started Emacs will |
| 1097 | always treat @kbd{M-# M-#} the same as @kbd{M-# c}. | 1081 | always treat @kbd{C-x * *} the same as @kbd{C-x * c}. |
| 1098 | 1082 | ||
| 1099 | The @kbd{q} key is another equivalent way to turn the Calculator off. | 1083 | The @kbd{q} key is another equivalent way to turn the Calculator off. |
| 1100 | 1084 | ||
| 1101 | If you type @kbd{M-# b} first and then @kbd{M-# c}, you get a | 1085 | If you type @kbd{C-x * b} first and then @kbd{C-x * c}, you get a |
| 1102 | full-screen version of Calc (@code{full-calc}) in which the stack and | 1086 | full-screen version of Calc (@code{full-calc}) in which the stack and |
| 1103 | trail windows are still side-by-side but are now as tall as the whole | 1087 | trail windows are still side-by-side but are now as tall as the whole |
| 1104 | Emacs screen. When you press @kbd{q} or @kbd{M-# c} again to quit, | 1088 | Emacs screen. When you press @kbd{q} or @kbd{C-x * c} again to quit, |
| 1105 | the file you were editing before reappears. The @kbd{M-# b} key | 1089 | the file you were editing before reappears. The @kbd{C-x * b} key |
| 1106 | switches back and forth between ``big'' full-screen mode and the | 1090 | switches back and forth between ``big'' full-screen mode and the |
| 1107 | normal partial-screen mode. | 1091 | normal partial-screen mode. |
| 1108 | 1092 | ||
| 1109 | Finally, @kbd{M-# o} (@code{calc-other-window}) is like @kbd{M-# c} | 1093 | Finally, @kbd{C-x * o} (@code{calc-other-window}) is like @kbd{C-x * c} |
| 1110 | except that the Calc window is not selected. The buffer you were | 1094 | except that the Calc window is not selected. The buffer you were |
| 1111 | editing before remains selected instead. @kbd{M-# o} is a handy | 1095 | editing before remains selected instead. @kbd{C-x * o} is a handy |
| 1112 | way to switch out of Calc momentarily to edit your file; type | 1096 | way to switch out of Calc momentarily to edit your file; type |
| 1113 | @kbd{M-# c} to switch back into Calc when you are done. | 1097 | @kbd{C-x * c} to switch back into Calc when you are done. |
| 1114 | 1098 | ||
| 1115 | @node Quick Mode Overview, Keypad Mode Overview, The Standard Interface, Using Calc | 1099 | @node Quick Mode Overview, Keypad Mode Overview, The Standard Interface, Using Calc |
| 1116 | @subsection Quick Mode (Overview) | 1100 | @subsection Quick Mode (Overview) |
| 1117 | 1101 | ||
| 1118 | @noindent | 1102 | @noindent |
| 1119 | @dfn{Quick mode} is a quick way to use Calc when you don't need the | 1103 | @dfn{Quick mode} is a quick way to use Calc when you don't need the |
| 1120 | full complexity of the stack and trail. To use it, type @kbd{M-# q} | 1104 | full complexity of the stack and trail. To use it, type @kbd{C-x * q} |
| 1121 | (@code{quick-calc}) in any regular editing buffer. | 1105 | (@code{quick-calc}) in any regular editing buffer. |
| 1122 | 1106 | ||
| 1123 | Quick mode is very simple: It prompts you to type any formula in | 1107 | Quick mode is very simple: It prompts you to type any formula in |
| 1124 | standard algebraic notation (like @samp{4 - 2/3}) and then displays | 1108 | standard algebraic notation (like @samp{4 - 2/3}) and then displays |
| 1125 | the result at the bottom of the Emacs screen (@mathit{3.33333333333} | 1109 | the result at the bottom of the Emacs screen (@mathit{3.33333333333} |
| 1126 | in this case). You are then back in the same editing buffer you | 1110 | in this case). You are then back in the same editing buffer you |
| 1127 | were in before, ready to continue editing or to type @kbd{M-# q} | 1111 | were in before, ready to continue editing or to type @kbd{C-x * q} |
| 1128 | again to do another quick calculation. The result of the calculation | 1112 | again to do another quick calculation. The result of the calculation |
| 1129 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command | 1113 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command |
| 1130 | at this point will yank the result into your editing buffer. | 1114 | at this point will yank the result into your editing buffer. |
| 1131 | 1115 | ||
| 1132 | Calc mode settings affect Quick mode, too, though you will have to | 1116 | Calc mode settings affect Quick mode, too, though you will have to |
| 1133 | go into regular Calc (with @kbd{M-# c}) to change the mode settings. | 1117 | go into regular Calc (with @kbd{C-x * c}) to change the mode settings. |
| 1134 | 1118 | ||
| 1135 | @c [fix-ref Quick Calculator mode] | 1119 | @c [fix-ref Quick Calculator mode] |
| 1136 | @xref{Quick Calculator}, for further information. | 1120 | @xref{Quick Calculator}, for further information. |
| @@ -1144,7 +1128,7 @@ It is designed for use with terminals that support a mouse. If you | |||
| 1144 | don't have a mouse, you will have to operate Keypad mode with your | 1128 | don't have a mouse, you will have to operate Keypad mode with your |
| 1145 | arrow keys (which is probably more trouble than it's worth). | 1129 | arrow keys (which is probably more trouble than it's worth). |
| 1146 | 1130 | ||
| 1147 | Type @kbd{M-# k} to turn Keypad mode on or off. Once again you | 1131 | Type @kbd{C-x * k} to turn Keypad mode on or off. Once again you |
| 1148 | get two new windows, this time on the righthand side of the screen | 1132 | get two new windows, this time on the righthand side of the screen |
| 1149 | instead of at the bottom. The upper window is the familiar Calc | 1133 | instead of at the bottom. The upper window is the familiar Calc |
| 1150 | Stack; the lower window is a picture of a typical calculator keypad. | 1134 | Stack; the lower window is a picture of a typical calculator keypad. |
| @@ -1206,7 +1190,7 @@ this buffer in the usual way while also clicking on the Calculator | |||
| 1206 | keypad. One advantage of Keypad mode is that you don't need an | 1190 | keypad. One advantage of Keypad mode is that you don't need an |
| 1207 | explicit command to switch between editing and calculating. | 1191 | explicit command to switch between editing and calculating. |
| 1208 | 1192 | ||
| 1209 | If you press @kbd{M-# b} first, you get a full-screen Keypad mode | 1193 | If you press @kbd{C-x * b} first, you get a full-screen Keypad mode |
| 1210 | (@code{full-calc-keypad}) with three windows: The keypad in the lower | 1194 | (@code{full-calc-keypad}) with three windows: The keypad in the lower |
| 1211 | left, the stack in the lower right, and the trail on top. | 1195 | left, the stack in the lower right, and the trail on top. |
| 1212 | 1196 | ||
| @@ -1234,13 +1218,13 @@ emacs -f full-calc-keypad | |||
| 1234 | @end example | 1218 | @end example |
| 1235 | 1219 | ||
| 1236 | @noindent | 1220 | @noindent |
| 1237 | which run a full-screen Calculator (as if by @kbd{M-# b M-# c}) or | 1221 | which run a full-screen Calculator (as if by @kbd{C-x * b C-x * c}) or |
| 1238 | a full-screen X-based Calculator (as if by @kbd{M-# b M-# k}). | 1222 | a full-screen X-based Calculator (as if by @kbd{C-x * b C-x * k}). |
| 1239 | In standalone operation, quitting the Calculator (by pressing | 1223 | In standalone operation, quitting the Calculator (by pressing |
| 1240 | @kbd{q} or clicking on the keypad @key{EXIT} button) quits Emacs | 1224 | @kbd{q} or clicking on the keypad @key{EXIT} button) quits Emacs |
| 1241 | itself. | 1225 | itself. |
| 1242 | 1226 | ||
| 1243 | @node Embedded Mode Overview, Other M-# Commands, Standalone Operation, Using Calc | 1227 | @node Embedded Mode Overview, Other C-x * Commands, Standalone Operation, Using Calc |
| 1244 | @subsection Embedded Mode (Overview) | 1228 | @subsection Embedded Mode (Overview) |
| 1245 | 1229 | ||
| 1246 | @noindent | 1230 | @noindent |
| @@ -1276,7 +1260,7 @@ is | |||
| 1276 | @end group | 1260 | @end group |
| 1277 | @end smallexample | 1261 | @end smallexample |
| 1278 | 1262 | ||
| 1279 | Now, move the cursor onto this new formula and press @kbd{M-# e}. | 1263 | Now, move the cursor onto this new formula and press @kbd{C-x * e}. |
| 1280 | Calc will read the formula (using the surrounding blank lines to | 1264 | Calc will read the formula (using the surrounding blank lines to |
| 1281 | tell how much text to read), then push this formula (invisibly) | 1265 | tell how much text to read), then push this formula (invisibly) |
| 1282 | onto the Calc stack. The cursor will stay on the formula in the | 1266 | onto the Calc stack. The cursor will stay on the formula in the |
| @@ -1340,10 +1324,10 @@ righthand label: Type @kbd{d @} (1) @key{RET}}. | |||
| 1340 | @end group | 1324 | @end group |
| 1341 | @end smallexample | 1325 | @end smallexample |
| 1342 | 1326 | ||
| 1343 | To leave Embedded mode, type @kbd{M-# e} again. The mode line | 1327 | To leave Embedded mode, type @kbd{C-x * e} again. The mode line |
| 1344 | and keyboard will revert to the way they were before. | 1328 | and keyboard will revert to the way they were before. |
| 1345 | 1329 | ||
| 1346 | The related command @kbd{M-# w} operates on a single word, which | 1330 | The related command @kbd{C-x * w} operates on a single word, which |
| 1347 | generally means a single number, inside text. It uses any | 1331 | generally means a single number, inside text. It uses any |
| 1348 | non-numeric characters rather than blank lines to delimit the | 1332 | non-numeric characters rather than blank lines to delimit the |
| 1349 | formula it reads. Here's an example of its use: | 1333 | formula it reads. Here's an example of its use: |
| @@ -1352,10 +1336,10 @@ formula it reads. Here's an example of its use: | |||
| 1352 | A slope of one-third corresponds to an angle of 1 degrees. | 1336 | A slope of one-third corresponds to an angle of 1 degrees. |
| 1353 | @end smallexample | 1337 | @end smallexample |
| 1354 | 1338 | ||
| 1355 | Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable | 1339 | Place the cursor on the @samp{1}, then type @kbd{C-x * w} to enable |
| 1356 | Embedded mode on that number. Now type @kbd{3 /} (to get one-third), | 1340 | Embedded mode on that number. Now type @kbd{3 /} (to get one-third), |
| 1357 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), | 1341 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), |
| 1358 | then @w{@kbd{M-# w}} again to exit Embedded mode. | 1342 | then @w{@kbd{C-x * w}} again to exit Embedded mode. |
| 1359 | 1343 | ||
| 1360 | @smallexample | 1344 | @smallexample |
| 1361 | A slope of one-third corresponds to an angle of 18.4349488229 degrees. | 1345 | A slope of one-third corresponds to an angle of 18.4349488229 degrees. |
| @@ -1364,48 +1348,51 @@ A slope of one-third corresponds to an angle of 18.4349488229 degrees. | |||
| 1364 | @c [fix-ref Embedded Mode] | 1348 | @c [fix-ref Embedded Mode] |
| 1365 | @xref{Embedded Mode}, for full details. | 1349 | @xref{Embedded Mode}, for full details. |
| 1366 | 1350 | ||
| 1367 | @node Other M-# Commands, , Embedded Mode Overview, Using Calc | 1351 | @node Other C-x * Commands, , Embedded Mode Overview, Using Calc |
| 1368 | @subsection Other @kbd{M-#} Commands | 1352 | @subsection Other @kbd{C-x *} Commands |
| 1369 | 1353 | ||
| 1370 | @noindent | 1354 | @noindent |
| 1371 | Two more Calc-related commands are @kbd{M-# g} and @kbd{M-# r}, | 1355 | Two more Calc-related commands are @kbd{C-x * g} and @kbd{C-x * r}, |
| 1372 | which ``grab'' data from a selected region of a buffer into the | 1356 | which ``grab'' data from a selected region of a buffer into the |
| 1373 | Calculator. The region is defined in the usual Emacs way, by | 1357 | Calculator. The region is defined in the usual Emacs way, by |
| 1374 | a ``mark'' placed at one end of the region, and the Emacs | 1358 | a ``mark'' placed at one end of the region, and the Emacs |
| 1375 | cursor or ``point'' placed at the other. | 1359 | cursor or ``point'' placed at the other. |
| 1376 | 1360 | ||
| 1377 | The @kbd{M-# g} command reads the region in the usual left-to-right, | 1361 | The @kbd{C-x * g} command reads the region in the usual left-to-right, |
| 1378 | top-to-bottom order. The result is packaged into a Calc vector | 1362 | top-to-bottom order. The result is packaged into a Calc vector |
| 1379 | of numbers and placed on the stack. Calc (in its standard | 1363 | of numbers and placed on the stack. Calc (in its standard |
| 1380 | user interface) is then started. Type @kbd{v u} if you want | 1364 | user interface) is then started. Type @kbd{v u} if you want |
| 1381 | to unpack this vector into separate numbers on the stack. Also, | 1365 | to unpack this vector into separate numbers on the stack. Also, |
| 1382 | @kbd{C-u M-# g} interprets the region as a single number or | 1366 | @kbd{C-u C-x * g} interprets the region as a single number or |
| 1383 | formula. | 1367 | formula. |
| 1384 | 1368 | ||
| 1385 | The @kbd{M-# r} command reads a rectangle, with the point and | 1369 | The @kbd{C-x * r} command reads a rectangle, with the point and |
| 1386 | mark defining opposite corners of the rectangle. The result | 1370 | mark defining opposite corners of the rectangle. The result |
| 1387 | is a matrix of numbers on the Calculator stack. | 1371 | is a matrix of numbers on the Calculator stack. |
| 1388 | 1372 | ||
| 1389 | Complementary to these is @kbd{M-# y}, which ``yanks'' the | 1373 | Complementary to these is @kbd{C-x * y}, which ``yanks'' the |
| 1390 | value at the top of the Calc stack back into an editing buffer. | 1374 | value at the top of the Calc stack back into an editing buffer. |
| 1391 | If you type @w{@kbd{M-# y}} while in such a buffer, the value is | 1375 | If you type @w{@kbd{C-x * y}} while in such a buffer, the value is |
| 1392 | yanked at the current position. If you type @kbd{M-# y} while | 1376 | yanked at the current position. If you type @kbd{C-x * y} while |
| 1393 | in the Calc buffer, Calc makes an educated guess as to which | 1377 | in the Calc buffer, Calc makes an educated guess as to which |
| 1394 | editing buffer you want to use. The Calc window does not have | 1378 | editing buffer you want to use. The Calc window does not have |
| 1395 | to be visible in order to use this command, as long as there | 1379 | to be visible in order to use this command, as long as there |
| 1396 | is something on the Calc stack. | 1380 | is something on the Calc stack. |
| 1397 | 1381 | ||
| 1398 | Here, for reference, is the complete list of @kbd{M-#} commands. | 1382 | Here, for reference, is the complete list of @kbd{C-x *} commands. |
| 1399 | The shift, control, and meta keys are ignored for the keystroke | 1383 | The shift, control, and meta keys are ignored for the keystroke |
| 1400 | following @kbd{M-#}. | 1384 | following @kbd{C-x *}. |
| 1401 | 1385 | ||
| 1402 | @noindent | 1386 | @noindent |
| 1403 | Commands for turning Calc on and off: | 1387 | Commands for turning Calc on and off: |
| 1404 | 1388 | ||
| 1405 | @table @kbd | 1389 | @table @kbd |
| 1406 | @item # | 1390 | @item * |
| 1407 | Turn Calc on or off, employing the same user interface as last time. | 1391 | Turn Calc on or off, employing the same user interface as last time. |
| 1408 | 1392 | ||
| 1393 | @item =, +, -, /, \, &, # | ||
| 1394 | Alternatives for @kbd{*}. | ||
| 1395 | |||
| 1409 | @item C | 1396 | @item C |
| 1410 | Turn Calc on or off using its standard bottom-of-the-screen | 1397 | Turn Calc on or off using its standard bottom-of-the-screen |
| 1411 | interface. If Calc is already turned on but the cursor is not | 1398 | interface. If Calc is already turned on but the cursor is not |
| @@ -1417,7 +1404,7 @@ Calc is already turned on and the cursor is in the Calc window, | |||
| 1417 | move it out of that window. | 1404 | move it out of that window. |
| 1418 | 1405 | ||
| 1419 | @item B | 1406 | @item B |
| 1420 | Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. | 1407 | Control whether @kbd{C-x * c} and @kbd{C-x * k} use the full screen. |
| 1421 | 1408 | ||
| 1422 | @item Q | 1409 | @item Q |
| 1423 | Use Quick mode for a single short calculation. | 1410 | Use Quick mode for a single short calculation. |
| @@ -1628,7 +1615,7 @@ finished in two weeks. | |||
| 1628 | @c [tutorial] | 1615 | @c [tutorial] |
| 1629 | 1616 | ||
| 1630 | @ifinfo | 1617 | @ifinfo |
| 1631 | @c This node is accessed by the `M-# t' command. | 1618 | @c This node is accessed by the `C-x * t' command. |
| 1632 | @node Interactive Tutorial, , , Top | 1619 | @node Interactive Tutorial, , , Top |
| 1633 | @chapter Tutorial | 1620 | @chapter Tutorial |
| 1634 | 1621 | ||
| @@ -1682,16 +1669,16 @@ the Embedded mode interface. | |||
| 1682 | The easiest way to read this tutorial on-line is to have two windows on | 1669 | The easiest way to read this tutorial on-line is to have two windows on |
| 1683 | your Emacs screen, one with Calc and one with the Info system. (If you | 1670 | your Emacs screen, one with Calc and one with the Info system. (If you |
| 1684 | have a printed copy of the manual you can use that instead.) Press | 1671 | have a printed copy of the manual you can use that instead.) Press |
| 1685 | @kbd{M-# c} to turn Calc on or to switch into the Calc window, and | 1672 | @kbd{C-x * c} to turn Calc on or to switch into the Calc window, and |
| 1686 | press @kbd{M-# i} to start the Info system or to switch into its window. | 1673 | press @kbd{C-x * i} to start the Info system or to switch into its window. |
| 1687 | Or, you may prefer to use the tutorial in printed form. | 1674 | Or, you may prefer to use the tutorial in printed form. |
| 1688 | @end ifinfo | 1675 | @end ifinfo |
| 1689 | @iftex | 1676 | @iftex |
| 1690 | The easiest way to read this tutorial on-line is to have two windows on | 1677 | The easiest way to read this tutorial on-line is to have two windows on |
| 1691 | your Emacs screen, one with Calc and one with the Info system. (If you | 1678 | your Emacs screen, one with Calc and one with the Info system. (If you |
| 1692 | have a printed copy of the manual you can use that instead.) Press | 1679 | have a printed copy of the manual you can use that instead.) Press |
| 1693 | @kbd{M-# c} to turn Calc on or to switch into the Calc window, and | 1680 | @kbd{C-x * c} to turn Calc on or to switch into the Calc window, and |
| 1694 | press @kbd{M-# i} to start the Info system or to switch into its window. | 1681 | press @kbd{C-x * i} to start the Info system or to switch into its window. |
| 1695 | @end iftex | 1682 | @end iftex |
| 1696 | 1683 | ||
| 1697 | This tutorial is designed to be done in sequence. But the rest of this | 1684 | This tutorial is designed to be done in sequence. But the rest of this |
| @@ -1772,8 +1759,8 @@ number of operands from the stack and pushes back the result. | |||
| 1772 | Thus we could add the numbers 2 and 3 in an RPN calculator by typing: | 1759 | Thus we could add the numbers 2 and 3 in an RPN calculator by typing: |
| 1773 | @kbd{2 @key{RET} 3 @key{RET} +}. (The @key{RET} key, Return, corresponds to | 1760 | @kbd{2 @key{RET} 3 @key{RET} +}. (The @key{RET} key, Return, corresponds to |
| 1774 | the @key{ENTER} key on traditional RPN calculators.) Try this now if | 1761 | the @key{ENTER} key on traditional RPN calculators.) Try this now if |
| 1775 | you wish; type @kbd{M-# c} to switch into the Calc window (you can type | 1762 | you wish; type @kbd{C-x * c} to switch into the Calc window (you can type |
| 1776 | @kbd{M-# c} again or @kbd{M-# o} to switch back to the Tutorial window). | 1763 | @kbd{C-x * c} again or @kbd{C-x * o} to switch back to the Tutorial window). |
| 1777 | The first four keystrokes ``push'' the numbers 2 and 3 onto the stack. | 1764 | The first four keystrokes ``push'' the numbers 2 and 3 onto the stack. |
| 1778 | The @kbd{+} key ``pops'' the top two numbers from the stack, adds them, | 1765 | The @kbd{+} key ``pops'' the top two numbers from the stack, adds them, |
| 1779 | and pushes the result (5) back onto the stack. Here's how the stack | 1766 | and pushes the result (5) back onto the stack. Here's how the stack |
| @@ -1785,7 +1772,7 @@ will look at various points throughout the calculation: | |||
| 1785 | . 1: 3 . | 1772 | . 1: 3 . |
| 1786 | . | 1773 | . |
| 1787 | 1774 | ||
| 1788 | M-# c 2 @key{RET} 3 @key{RET} + @key{DEL} | 1775 | C-x * c 2 @key{RET} 3 @key{RET} + @key{DEL} |
| 1789 | @end group | 1776 | @end group |
| 1790 | @end smallexample | 1777 | @end smallexample |
| 1791 | 1778 | ||
| @@ -2434,7 +2421,7 @@ when we discuss the algebra and calculus features of the Calculator. | |||
| 2434 | @noindent | 2421 | @noindent |
| 2435 | If you make a mistake, you can usually correct it by pressing shift-@kbd{U}, | 2422 | If you make a mistake, you can usually correct it by pressing shift-@kbd{U}, |
| 2436 | the ``undo'' command. First, clear the stack (@kbd{M-0 @key{DEL}}) and exit | 2423 | the ``undo'' command. First, clear the stack (@kbd{M-0 @key{DEL}}) and exit |
| 2437 | and restart Calc (@kbd{M-# M-# M-# M-#}) to make sure things start off | 2424 | and restart Calc (@kbd{C-x * * C-x * *}) to make sure things start off |
| 2438 | with a clean slate. Now: | 2425 | with a clean slate. Now: |
| 2439 | 2426 | ||
| 2440 | @smallexample | 2427 | @smallexample |
| @@ -4093,7 +4080,7 @@ of values in a file we have loaded into Emacs: | |||
| 4093 | 4080 | ||
| 4094 | @noindent | 4081 | @noindent |
| 4095 | If you are reading this tutorial in printed form, you will find it | 4082 | If you are reading this tutorial in printed form, you will find it |
| 4096 | easiest to press @kbd{M-# i} to enter the on-line Info version of | 4083 | easiest to press @kbd{C-x * i} to enter the on-line Info version of |
| 4097 | the manual and find this table there. (Press @kbd{g}, then type | 4084 | the manual and find this table there. (Press @kbd{g}, then type |
| 4098 | @kbd{List Tutorial}, to jump straight to this section.) | 4085 | @kbd{List Tutorial}, to jump straight to this section.) |
| 4099 | 4086 | ||
| @@ -4102,7 +4089,7 @@ to the left of the @expr{1.34}. Press @kbd{C-@@} to set the mark. | |||
| 4102 | (On your system this may be @kbd{C-2}, @kbd{C-@key{SPC}}, or @kbd{NUL}.) | 4089 | (On your system this may be @kbd{C-2}, @kbd{C-@key{SPC}}, or @kbd{NUL}.) |
| 4103 | Now position the cursor to the lower-right, just after the @expr{1.354}. | 4090 | Now position the cursor to the lower-right, just after the @expr{1.354}. |
| 4104 | You have now defined this region as an Emacs ``rectangle.'' Still | 4091 | You have now defined this region as an Emacs ``rectangle.'' Still |
| 4105 | in the Info buffer, type @kbd{M-# r}. This command | 4092 | in the Info buffer, type @kbd{C-x * r}. This command |
| 4106 | (@code{calc-grab-rectangle}) will pop you back into the Calculator, with | 4093 | (@code{calc-grab-rectangle}) will pop you back into the Calculator, with |
| 4107 | the contents of the rectangle you specified in the form of a matrix. | 4094 | the contents of the rectangle you specified in the form of a matrix. |
| 4108 | 4095 | ||
| @@ -4372,7 +4359,7 @@ to solve for @expr{m} and @expr{b}, duplicating the above result. | |||
| 4372 | 4359 | ||
| 4373 | @cindex Geometric mean | 4360 | @cindex Geometric mean |
| 4374 | (@bullet{}) @strong{Exercise 3.} If the input data do not form a | 4361 | (@bullet{}) @strong{Exercise 3.} If the input data do not form a |
| 4375 | rectangle, you can use @w{@kbd{M-# g}} (@code{calc-grab-region}) | 4362 | rectangle, you can use @w{@kbd{C-x * g}} (@code{calc-grab-region}) |
| 4376 | to grab the data the way Emacs normally works with regions---it reads | 4363 | to grab the data the way Emacs normally works with regions---it reads |
| 4377 | left-to-right, top-to-bottom, treating line breaks the same as spaces. | 4364 | left-to-right, top-to-bottom, treating line breaks the same as spaces. |
| 4378 | Use this command to find the geometric mean of the following numbers. | 4365 | Use this command to find the geometric mean of the following numbers. |
| @@ -4385,7 +4372,7 @@ Use this command to find the geometric mean of the following numbers. | |||
| 4385 | @end example | 4372 | @end example |
| 4386 | 4373 | ||
| 4387 | @noindent | 4374 | @noindent |
| 4388 | The @kbd{M-# g} command accepts numbers separated by spaces or commas, | 4375 | The @kbd{C-x * g} command accepts numbers separated by spaces or commas, |
| 4389 | with or without surrounding vector brackets. | 4376 | with or without surrounding vector brackets. |
| 4390 | @xref{List Answer 3, 3}. (@bullet{}) | 4377 | @xref{List Answer 3, 3}. (@bullet{}) |
| 4391 | 4378 | ||
| @@ -5120,7 +5107,7 @@ numbers are in which units: | |||
| 5120 | @end smallexample | 5107 | @end smallexample |
| 5121 | 5108 | ||
| 5122 | To see a complete list of built-in units, type @kbd{u v}. Press | 5109 | To see a complete list of built-in units, type @kbd{u v}. Press |
| 5123 | @w{@kbd{M-# c}} again to re-enter the Calculator when you're done looking | 5110 | @w{@kbd{C-x * c}} again to re-enter the Calculator when you're done looking |
| 5124 | at the units table. | 5111 | at the units table. |
| 5125 | 5112 | ||
| 5126 | (@bullet{}) @strong{Exercise 13.} How many seconds are there really | 5113 | (@bullet{}) @strong{Exercise 13.} How many seconds are there really |
| @@ -6586,9 +6573,9 @@ The @file{edmacro} package defines a handy @code{read-kbd-macro} command | |||
| 6586 | which reads the current region of the current buffer as a sequence of | 6573 | which reads the current region of the current buffer as a sequence of |
| 6587 | keystroke names, and defines that sequence on the @kbd{X} | 6574 | keystroke names, and defines that sequence on the @kbd{X} |
| 6588 | (and @kbd{C-x e}) key. Because this is so useful, Calc puts this | 6575 | (and @kbd{C-x e}) key. Because this is so useful, Calc puts this |
| 6589 | command on the @kbd{M-# m} key. Try reading in this macro in the | 6576 | command on the @kbd{C-x * m} key. Try reading in this macro in the |
| 6590 | following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at | 6577 | following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at |
| 6591 | one end of the text below, then type @kbd{M-# m} at the other. | 6578 | one end of the text below, then type @kbd{C-x * m} at the other. |
| 6592 | 6579 | ||
| 6593 | @example | 6580 | @example |
| 6594 | @group | 6581 | @group |
| @@ -6738,7 +6725,7 @@ it to a key with, e.g., @kbd{Z K s}. Now enter the true definition, | |||
| 6738 | using the @kbd{z s} command to call itself recursively, then assign it | 6725 | using the @kbd{z s} command to call itself recursively, then assign it |
| 6739 | to the same key with @kbd{Z K s}. Now the @kbd{z s} command will run | 6726 | to the same key with @kbd{Z K s}. Now the @kbd{z s} command will run |
| 6740 | the complete recursive program. (Another way is to use @w{@kbd{Z E}} | 6727 | the complete recursive program. (Another way is to use @w{@kbd{Z E}} |
| 6741 | or @kbd{M-# m} (@code{read-kbd-macro}) to read the whole macro at once, | 6728 | or @kbd{C-x * m} (@code{read-kbd-macro}) to read the whole macro at once, |
| 6742 | thus avoiding the ``training'' phase.) The task: Write a program | 6729 | thus avoiding the ``training'' phase.) The task: Write a program |
| 6743 | that computes Stirling numbers of the first kind, given @expr{n} and | 6730 | that computes Stirling numbers of the first kind, given @expr{n} and |
| 6744 | @expr{m} on the stack. Test it with @emph{small} inputs like | 6731 | @expr{m} on the stack. Test it with @emph{small} inputs like |
| @@ -7530,7 +7517,7 @@ fits. @xref{Curve Fitting}. | |||
| 7530 | @noindent | 7517 | @noindent |
| 7531 | Move to one end of the list and press @kbd{C-@@} (or @kbd{C-@key{SPC}} or | 7518 | Move to one end of the list and press @kbd{C-@@} (or @kbd{C-@key{SPC}} or |
| 7532 | whatever) to set the mark, then move to the other end of the list | 7519 | whatever) to set the mark, then move to the other end of the list |
| 7533 | and type @w{@kbd{M-# g}}. | 7520 | and type @w{@kbd{C-x * g}}. |
| 7534 | 7521 | ||
| 7535 | @smallexample | 7522 | @smallexample |
| 7536 | @group | 7523 | @group |
| @@ -9525,7 +9512,7 @@ the formula | |||
| 9525 | @infoline @expr{x - f(x)/f'(x)}. | 9512 | @infoline @expr{x - f(x)/f'(x)}. |
| 9526 | 9513 | ||
| 9527 | (Because this definition is long, it will be repeated in concise form | 9514 | (Because this definition is long, it will be repeated in concise form |
| 9528 | below. You can use @w{@kbd{M-# m}} to load it from there. While you are | 9515 | below. You can use @w{@kbd{C-x * m}} to load it from there. While you are |
| 9529 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects | 9516 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects |
| 9530 | keystrokes without executing them. In the following diagrams we'll | 9517 | keystrokes without executing them. In the following diagrams we'll |
| 9531 | pretend Calc actually executed the keystrokes as you typed them, | 9518 | pretend Calc actually executed the keystrokes as you typed them, |
| @@ -9647,7 +9634,7 @@ and remember to add back a factor of @expr{-1/z} when we're done. This | |||
| 9647 | step is repeated until @expr{z > 5}. | 9634 | step is repeated until @expr{z > 5}. |
| 9648 | 9635 | ||
| 9649 | (Because this definition is long, it will be repeated in concise form | 9636 | (Because this definition is long, it will be repeated in concise form |
| 9650 | below. You can use @w{@kbd{M-# m}} to load it from there. While you are | 9637 | below. You can use @w{@kbd{C-x * m}} to load it from there. While you are |
| 9651 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects | 9638 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects |
| 9652 | keystrokes without executing them. In the following diagrams we'll | 9639 | keystrokes without executing them. In the following diagrams we'll |
| 9653 | pretend Calc actually executed the keystrokes as you typed them, | 9640 | pretend Calc actually executed the keystrokes as you typed them, |
| @@ -9768,7 +9755,7 @@ derivative of a polynomial, evaluated at @expr{x = 0}, will equal the | |||
| 9768 | coefficient on the @expr{x^n} term times @expr{n!}. | 9755 | coefficient on the @expr{x^n} term times @expr{n!}. |
| 9769 | 9756 | ||
| 9770 | (Because this definition is long, it will be repeated in concise form | 9757 | (Because this definition is long, it will be repeated in concise form |
| 9771 | below. You can use @w{@kbd{M-# m}} to load it from there. While you are | 9758 | below. You can use @w{@kbd{C-x * m}} to load it from there. While you are |
| 9772 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects | 9759 | entering a @kbd{Z ` Z '} body in a macro, Calc simply collects |
| 9773 | keystrokes without executing them. In the following diagrams we'll | 9760 | keystrokes without executing them. In the following diagrams we'll |
| 9774 | pretend Calc actually executed the keystrokes as you typed them, | 9761 | pretend Calc actually executed the keystrokes as you typed them, |
| @@ -9877,7 +9864,7 @@ definition. The recurrence needs to be rewritten slightly, | |||
| 9877 | to the form @expr{s(n,m) = s(n-1,m-1) - (n-1) s(n-1,m)}. | 9864 | to the form @expr{s(n,m) = s(n-1,m-1) - (n-1) s(n-1,m)}. |
| 9878 | 9865 | ||
| 9879 | (Because this definition is long, it will be repeated in concise form | 9866 | (Because this definition is long, it will be repeated in concise form |
| 9880 | below. You can use @kbd{M-# m} to load it from there.) | 9867 | below. You can use @kbd{C-x * m} to load it from there.) |
| 9881 | 9868 | ||
| 9882 | @smallexample | 9869 | @smallexample |
| 9883 | @group | 9870 | @group |
| @@ -9951,10 +9938,10 @@ C-x ) | |||
| 9951 | @end group | 9938 | @end group |
| 9952 | @end example | 9939 | @end example |
| 9953 | 9940 | ||
| 9954 | You can read this definition using @kbd{M-# m} (@code{read-kbd-macro}) | 9941 | You can read this definition using @kbd{C-x * m} (@code{read-kbd-macro}) |
| 9955 | followed by @kbd{Z K s}, without having to make a dummy definition | 9942 | followed by @kbd{Z K s}, without having to make a dummy definition |
| 9956 | first, because @code{read-kbd-macro} doesn't need to execute the | 9943 | first, because @code{read-kbd-macro} doesn't need to execute the |
| 9957 | definition as it reads it in. For this reason, @code{M-# m} is often | 9944 | definition as it reads it in. For this reason, @code{C-x * m} is often |
| 9958 | the easiest way to create recursive programs in Calc. | 9945 | the easiest way to create recursive programs in Calc. |
| 9959 | 9946 | ||
| 9960 | @node Programming Answer 12, , Programming Answer 11, Answers to Exercises | 9947 | @node Programming Answer 12, , Programming Answer 11, Answers to Exercises |
| @@ -10044,15 +10031,14 @@ still work when the trail buffer's window is selected. It is possible | |||
| 10044 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself | 10031 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself |
| 10045 | still exists and is updated silently. @xref{Trail Commands}. | 10032 | still exists and is updated silently. @xref{Trail Commands}. |
| 10046 | 10033 | ||
| 10047 | @kindex M-# c | 10034 | @kindex C-x * c |
| 10048 | @kindex M-# M-# | 10035 | @kindex C-x * * |
| 10049 | @ignore | 10036 | @ignore |
| 10050 | @mindex @null | 10037 | @mindex @null |
| 10051 | @end ignore | 10038 | @end ignore |
| 10052 | @kindex M-# # | 10039 | In most installations, the @kbd{C-x * c} key sequence is a more |
| 10053 | In most installations, the @kbd{M-# c} key sequence is a more | 10040 | convenient way to start the Calculator. Also, @kbd{C-x * *} |
| 10054 | convenient way to start the Calculator. Also, @kbd{M-# M-#} and | 10041 | is a synonym for @kbd{C-x * c} unless you last used Calc |
| 10055 | @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc | ||
| 10056 | in its Keypad mode. | 10042 | in its Keypad mode. |
| 10057 | 10043 | ||
| 10058 | @kindex x | 10044 | @kindex x |
| @@ -10068,7 +10054,7 @@ for you. For example, the following key sequences are equivalent: | |||
| 10068 | 10054 | ||
| 10069 | @cindex Extensions module | 10055 | @cindex Extensions module |
| 10070 | @cindex @file{calc-ext} module | 10056 | @cindex @file{calc-ext} module |
| 10071 | The Calculator exists in many parts. When you type @kbd{M-# c}, the | 10057 | The Calculator exists in many parts. When you type @kbd{C-x * c}, the |
| 10072 | Emacs ``auto-load'' mechanism will bring in only the first part, which | 10058 | Emacs ``auto-load'' mechanism will bring in only the first part, which |
| 10073 | contains the basic arithmetic functions. The other parts will be | 10059 | contains the basic arithmetic functions. The other parts will be |
| 10074 | auto-loaded the first time you use the more advanced commands like trig | 10060 | auto-loaded the first time you use the more advanced commands like trig |
| @@ -10076,48 +10062,48 @@ functions or matrix operations. This is done to improve the response time | |||
| 10076 | of the Calculator in the common case when all you need to do is a | 10062 | of the Calculator in the common case when all you need to do is a |
| 10077 | little arithmetic. If for some reason the Calculator fails to load an | 10063 | little arithmetic. If for some reason the Calculator fails to load an |
| 10078 | extension module automatically, you can force it to load all the | 10064 | extension module automatically, you can force it to load all the |
| 10079 | extensions by using the @kbd{M-# L} (@code{calc-load-everything}) | 10065 | extensions by using the @kbd{C-x * L} (@code{calc-load-everything}) |
| 10080 | command. @xref{Mode Settings}. | 10066 | command. @xref{Mode Settings}. |
| 10081 | 10067 | ||
| 10082 | If you type @kbd{M-x calc} or @kbd{M-# c} with any numeric prefix argument, | 10068 | If you type @kbd{M-x calc} or @kbd{C-x * c} with any numeric prefix argument, |
| 10083 | the Calculator is loaded if necessary, but it is not actually started. | 10069 | the Calculator is loaded if necessary, but it is not actually started. |
| 10084 | If the argument is positive, the @file{calc-ext} extensions are also | 10070 | If the argument is positive, the @file{calc-ext} extensions are also |
| 10085 | loaded if necessary. User-written Lisp code that wishes to make use | 10071 | loaded if necessary. User-written Lisp code that wishes to make use |
| 10086 | of Calc's arithmetic routines can use @samp{(calc 0)} or @samp{(calc 1)} | 10072 | of Calc's arithmetic routines can use @samp{(calc 0)} or @samp{(calc 1)} |
| 10087 | to auto-load the Calculator. | 10073 | to auto-load the Calculator. |
| 10088 | 10074 | ||
| 10089 | @kindex M-# b | 10075 | @kindex C-x * b |
| 10090 | @pindex full-calc | 10076 | @pindex full-calc |
| 10091 | If you type @kbd{M-# b}, then next time you use @kbd{M-# c} you | 10077 | If you type @kbd{C-x * b}, then next time you use @kbd{C-x * c} you |
| 10092 | will get a Calculator that uses the full height of the Emacs screen. | 10078 | will get a Calculator that uses the full height of the Emacs screen. |
| 10093 | When full-screen mode is on, @kbd{M-# c} runs the @code{full-calc} | 10079 | When full-screen mode is on, @kbd{C-x * c} runs the @code{full-calc} |
| 10094 | command instead of @code{calc}. From the Unix shell you can type | 10080 | command instead of @code{calc}. From the Unix shell you can type |
| 10095 | @samp{emacs -f full-calc} to start a new Emacs specifically for use | 10081 | @samp{emacs -f full-calc} to start a new Emacs specifically for use |
| 10096 | as a calculator. When Calc is started from the Emacs command line | 10082 | as a calculator. When Calc is started from the Emacs command line |
| 10097 | like this, Calc's normal ``quit'' commands actually quit Emacs itself. | 10083 | like this, Calc's normal ``quit'' commands actually quit Emacs itself. |
| 10098 | 10084 | ||
| 10099 | @kindex M-# o | 10085 | @kindex C-x * o |
| 10100 | @pindex calc-other-window | 10086 | @pindex calc-other-window |
| 10101 | The @kbd{M-# o} command is like @kbd{M-# c} except that the Calc | 10087 | The @kbd{C-x * o} command is like @kbd{C-x * c} except that the Calc |
| 10102 | window is not actually selected. If you are already in the Calc | 10088 | window is not actually selected. If you are already in the Calc |
| 10103 | window, @kbd{M-# o} switches you out of it. (The regular Emacs | 10089 | window, @kbd{C-x * o} switches you out of it. (The regular Emacs |
| 10104 | @kbd{C-x o} command would also work for this, but it has a | 10090 | @kbd{C-x o} command would also work for this, but it has a |
| 10105 | tendency to drop you into the Calc Trail window instead, which | 10091 | tendency to drop you into the Calc Trail window instead, which |
| 10106 | @kbd{M-# o} takes care not to do.) | 10092 | @kbd{C-x * o} takes care not to do.) |
| 10107 | 10093 | ||
| 10108 | @ignore | 10094 | @ignore |
| 10109 | @mindex M-# q | 10095 | @mindex C-x * q |
| 10110 | @end ignore | 10096 | @end ignore |
| 10111 | For one quick calculation, you can type @kbd{M-# q} (@code{quick-calc}) | 10097 | For one quick calculation, you can type @kbd{C-x * q} (@code{quick-calc}) |
| 10112 | which prompts you for a formula (like @samp{2+3/4}). The result is | 10098 | which prompts you for a formula (like @samp{2+3/4}). The result is |
| 10113 | displayed at the bottom of the Emacs screen without ever creating | 10099 | displayed at the bottom of the Emacs screen without ever creating |
| 10114 | any special Calculator windows. @xref{Quick Calculator}. | 10100 | any special Calculator windows. @xref{Quick Calculator}. |
| 10115 | 10101 | ||
| 10116 | @ignore | 10102 | @ignore |
| 10117 | @mindex M-# k | 10103 | @mindex C-x * k |
| 10118 | @end ignore | 10104 | @end ignore |
| 10119 | Finally, if you are using the X window system you may want to try | 10105 | Finally, if you are using the X window system you may want to try |
| 10120 | @kbd{M-# k} (@code{calc-keypad}) which runs Calc with a | 10106 | @kbd{C-x * k} (@code{calc-keypad}) which runs Calc with a |
| 10121 | ``calculator keypad'' picture as well as a stack display. Click on | 10107 | ``calculator keypad'' picture as well as a stack display. Click on |
| 10122 | the keys with the mouse to operate the calculator. @xref{Keypad Mode}. | 10108 | the keys with the mouse to operate the calculator. @xref{Keypad Mode}. |
| 10123 | 10109 | ||
| @@ -10128,13 +10114,13 @@ the keys with the mouse to operate the calculator. @xref{Keypad Mode}. | |||
| 10128 | The @kbd{q} key (@code{calc-quit}) exits Calc mode and closes the | 10114 | The @kbd{q} key (@code{calc-quit}) exits Calc mode and closes the |
| 10129 | Calculator's window(s). It does not delete the Calculator buffers. | 10115 | Calculator's window(s). It does not delete the Calculator buffers. |
| 10130 | If you type @kbd{M-x calc} again, the Calculator will reappear with the | 10116 | If you type @kbd{M-x calc} again, the Calculator will reappear with the |
| 10131 | contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} | 10117 | contents of the stack intact. Typing @kbd{C-x * c} or @kbd{C-x * *} |
| 10132 | again from inside the Calculator buffer is equivalent to executing | 10118 | again from inside the Calculator buffer is equivalent to executing |
| 10133 | @code{calc-quit}; you can think of @kbd{M-# M-#} as toggling the | 10119 | @code{calc-quit}; you can think of @kbd{C-x * *} as toggling the |
| 10134 | Calculator on and off. | 10120 | Calculator on and off. |
| 10135 | 10121 | ||
| 10136 | @kindex M-# x | 10122 | @kindex C-x * x |
| 10137 | The @kbd{M-# x} command also turns the Calculator off, no matter which | 10123 | The @kbd{C-x * x} command also turns the Calculator off, no matter which |
| 10138 | user interface (standard, Keypad, or Embedded) is currently active. | 10124 | user interface (standard, Keypad, or Embedded) is currently active. |
| 10139 | It also cancels @code{calc-edit} mode if used from there. | 10125 | It also cancels @code{calc-edit} mode if used from there. |
| 10140 | 10126 | ||
| @@ -10174,18 +10160,18 @@ The @kbd{@{} and @kbd{@}} keys are bound to @code{calc-scroll-down} | |||
| 10174 | and @code{calc-scroll-up}. They scroll up or down by one-half the | 10160 | and @code{calc-scroll-up}. They scroll up or down by one-half the |
| 10175 | height of the Calc window. | 10161 | height of the Calc window. |
| 10176 | 10162 | ||
| 10177 | @kindex M-# 0 | 10163 | @kindex C-x * 0 |
| 10178 | @pindex calc-reset | 10164 | @pindex calc-reset |
| 10179 | The @kbd{M-# 0} command (@code{calc-reset}; that's @kbd{M-#} followed | 10165 | The @kbd{C-x * 0} command (@code{calc-reset}; that's @kbd{C-x *} followed |
| 10180 | by a zero) resets the Calculator to its initial state. This clears | 10166 | by a zero) resets the Calculator to its initial state. This clears |
| 10181 | the stack, resets all the modes to their initial values (the values | 10167 | the stack, resets all the modes to their initial values (the values |
| 10182 | that were saved with @kbd{m m} (@code{calc-save-modes})), clears the | 10168 | that were saved with @kbd{m m} (@code{calc-save-modes})), clears the |
| 10183 | caches (@pxref{Caches}), and so on. (It does @emph{not} erase the | 10169 | caches (@pxref{Caches}), and so on. (It does @emph{not} erase the |
| 10184 | values of any variables.) With an argument of 0, Calc will be reset to | 10170 | values of any variables.) With an argument of 0, Calc will be reset to |
| 10185 | its default state; namely, the modes will be given their default values. | 10171 | its default state; namely, the modes will be given their default values. |
| 10186 | With a positive prefix argument, @kbd{M-# 0} preserves the contents of | 10172 | With a positive prefix argument, @kbd{C-x * 0} preserves the contents of |
| 10187 | the stack but resets everything else to its initial state; with a | 10173 | the stack but resets everything else to its initial state; with a |
| 10188 | negative prefix argument, @kbd{M-# 0} preserves the contents of the | 10174 | negative prefix argument, @kbd{C-x * 0} preserves the contents of the |
| 10189 | stack but resets everything else to its default state. | 10175 | stack but resets everything else to its default state. |
| 10190 | 10176 | ||
| 10191 | @pindex calc-version | 10177 | @pindex calc-version |
| @@ -10219,21 +10205,21 @@ provide help within Calc. Many of the @kbd{h} key functions are | |||
| 10219 | Calc-specific analogues to the @kbd{C-h} functions for Emacs help. | 10205 | Calc-specific analogues to the @kbd{C-h} functions for Emacs help. |
| 10220 | 10206 | ||
| 10221 | @kindex h i | 10207 | @kindex h i |
| 10222 | @kindex M-# i | 10208 | @kindex C-x * i |
| 10223 | @kindex i | 10209 | @kindex i |
| 10224 | @pindex calc-info | 10210 | @pindex calc-info |
| 10225 | The @kbd{h i} (@code{calc-info}) command runs the Emacs Info system | 10211 | The @kbd{h i} (@code{calc-info}) command runs the Emacs Info system |
| 10226 | to read this manual on-line. This is basically the same as typing | 10212 | to read this manual on-line. This is basically the same as typing |
| 10227 | @kbd{C-h i} (the regular way to run the Info system), then, if Info | 10213 | @kbd{C-h i} (the regular way to run the Info system), then, if Info |
| 10228 | is not already in the Calc manual, selecting the beginning of the | 10214 | is not already in the Calc manual, selecting the beginning of the |
| 10229 | manual. The @kbd{M-# i} command is another way to read the Calc | 10215 | manual. The @kbd{C-x * i} command is another way to read the Calc |
| 10230 | manual; it is different from @kbd{h i} in that it works any time, | 10216 | manual; it is different from @kbd{h i} in that it works any time, |
| 10231 | not just inside Calc. The plain @kbd{i} key is also equivalent to | 10217 | not just inside Calc. The plain @kbd{i} key is also equivalent to |
| 10232 | @kbd{h i}, though this key is obsolete and may be replaced with a | 10218 | @kbd{h i}, though this key is obsolete and may be replaced with a |
| 10233 | different command in a future version of Calc. | 10219 | different command in a future version of Calc. |
| 10234 | 10220 | ||
| 10235 | @kindex h t | 10221 | @kindex h t |
| 10236 | @kindex M-# t | 10222 | @kindex C-x * t |
| 10237 | @pindex calc-tutorial | 10223 | @pindex calc-tutorial |
| 10238 | The @kbd{h t} (@code{calc-tutorial}) command runs the Info system on | 10224 | The @kbd{h t} (@code{calc-tutorial}) command runs the Info system on |
| 10239 | the Tutorial section of the Calc manual. It is like @kbd{h i}, | 10225 | the Tutorial section of the Calc manual. It is like @kbd{h i}, |
| @@ -10241,14 +10227,14 @@ except that it selects the starting node of the tutorial rather | |||
| 10241 | than the beginning of the whole manual. (It actually selects the | 10227 | than the beginning of the whole manual. (It actually selects the |
| 10242 | node ``Interactive Tutorial'' which tells a few things about | 10228 | node ``Interactive Tutorial'' which tells a few things about |
| 10243 | using the Info system before going on to the actual tutorial.) | 10229 | using the Info system before going on to the actual tutorial.) |
| 10244 | The @kbd{M-# t} key is equivalent to @kbd{h t} (but it works at | 10230 | The @kbd{C-x * t} key is equivalent to @kbd{h t} (but it works at |
| 10245 | all times). | 10231 | all times). |
| 10246 | 10232 | ||
| 10247 | @kindex h s | 10233 | @kindex h s |
| 10248 | @kindex M-# s | 10234 | @kindex C-x * s |
| 10249 | @pindex calc-info-summary | 10235 | @pindex calc-info-summary |
| 10250 | The @kbd{h s} (@code{calc-info-summary}) command runs the Info system | 10236 | The @kbd{h s} (@code{calc-info-summary}) command runs the Info system |
| 10251 | on the Summary node of the Calc manual. @xref{Summary}. The @kbd{M-# s} | 10237 | on the Summary node of the Calc manual. @xref{Summary}. The @kbd{C-x * s} |
| 10252 | key is equivalent to @kbd{h s}. | 10238 | key is equivalent to @kbd{h s}. |
| 10253 | 10239 | ||
| 10254 | @kindex h k | 10240 | @kindex h k |
| @@ -10526,11 +10512,11 @@ you might then press @kbd{=} when it is time to evaluate this formula. | |||
| 10526 | @section ``Quick Calculator'' Mode | 10512 | @section ``Quick Calculator'' Mode |
| 10527 | 10513 | ||
| 10528 | @noindent | 10514 | @noindent |
| 10529 | @kindex M-# q | 10515 | @kindex C-x * q |
| 10530 | @pindex quick-calc | 10516 | @pindex quick-calc |
| 10531 | @cindex Quick Calculator | 10517 | @cindex Quick Calculator |
| 10532 | There is another way to invoke the Calculator if all you need to do | 10518 | There is another way to invoke the Calculator if all you need to do |
| 10533 | is make one or two quick calculations. Type @kbd{M-# q} (or | 10519 | is make one or two quick calculations. Type @kbd{C-x * q} (or |
| 10534 | @kbd{M-x quick-calc}), then type any formula as an algebraic entry. | 10520 | @kbd{M-x quick-calc}), then type any formula as an algebraic entry. |
| 10535 | The Calculator will compute the result and display it in the echo | 10521 | The Calculator will compute the result and display it in the echo |
| 10536 | area, without ever actually putting up a Calc window. | 10522 | area, without ever actually putting up a Calc window. |
| @@ -10539,11 +10525,11 @@ You can use the @kbd{$} character in a Quick Calculator formula to | |||
| 10539 | refer to the previous Quick Calculator result. Older results are | 10525 | refer to the previous Quick Calculator result. Older results are |
| 10540 | not retained; the Quick Calculator has no effect on the full | 10526 | not retained; the Quick Calculator has no effect on the full |
| 10541 | Calculator's stack or trail. If you compute a result and then | 10527 | Calculator's stack or trail. If you compute a result and then |
| 10542 | forget what it was, just run @code{M-# q} again and enter | 10528 | forget what it was, just run @code{C-x * q} again and enter |
| 10543 | @samp{$} as the formula. | 10529 | @samp{$} as the formula. |
| 10544 | 10530 | ||
| 10545 | If this is the first time you have used the Calculator in this Emacs | 10531 | If this is the first time you have used the Calculator in this Emacs |
| 10546 | session, the @kbd{M-# q} command will create the @code{*Calculator*} | 10532 | session, the @kbd{C-x * q} command will create the @code{*Calculator*} |
| 10547 | buffer and perform all the usual initializations; it simply will | 10533 | buffer and perform all the usual initializations; it simply will |
| 10548 | refrain from putting that buffer up in a new window. The Quick | 10534 | refrain from putting that buffer up in a new window. The Quick |
| 10549 | Calculator refers to the @code{*Calculator*} buffer for all mode | 10535 | Calculator refers to the @code{*Calculator*} buffer for all mode |
| @@ -10551,15 +10537,15 @@ settings. Thus, for example, to set the precision that the Quick | |||
| 10551 | Calculator uses, simply run the full Calculator momentarily and use | 10537 | Calculator uses, simply run the full Calculator momentarily and use |
| 10552 | the regular @kbd{p} command. | 10538 | the regular @kbd{p} command. |
| 10553 | 10539 | ||
| 10554 | If you use @code{M-# q} from inside the Calculator buffer, the | 10540 | If you use @code{C-x * q} from inside the Calculator buffer, the |
| 10555 | effect is the same as pressing the apostrophe key (algebraic entry). | 10541 | effect is the same as pressing the apostrophe key (algebraic entry). |
| 10556 | 10542 | ||
| 10557 | The result of a Quick calculation is placed in the Emacs ``kill ring'' | 10543 | The result of a Quick calculation is placed in the Emacs ``kill ring'' |
| 10558 | as well as being displayed. A subsequent @kbd{C-y} command will | 10544 | as well as being displayed. A subsequent @kbd{C-y} command will |
| 10559 | yank the result into the editing buffer. You can also use this | 10545 | yank the result into the editing buffer. You can also use this |
| 10560 | to yank the result into the next @kbd{M-# q} input line as a more | 10546 | to yank the result into the next @kbd{C-x * q} input line as a more |
| 10561 | explicit alternative to @kbd{$} notation, or to yank the result | 10547 | explicit alternative to @kbd{$} notation, or to yank the result |
| 10562 | into the Calculator stack after typing @kbd{M-# c}. | 10548 | into the Calculator stack after typing @kbd{C-x * c}. |
| 10563 | 10549 | ||
| 10564 | If you finish your formula by typing @key{LFD} (or @kbd{C-j}) instead | 10550 | If you finish your formula by typing @key{LFD} (or @kbd{C-j}) instead |
| 10565 | of @key{RET}, the result is inserted immediately into the current | 10551 | of @key{RET}, the result is inserted immediately into the current |
| @@ -10655,7 +10641,7 @@ queried whether or not to restore the variable to its original value. | |||
| 10655 | The @kbd{U} key may be pressed any number of times to undo successively | 10641 | The @kbd{U} key may be pressed any number of times to undo successively |
| 10656 | farther back in time; with a numeric prefix argument it undoes a | 10642 | farther back in time; with a numeric prefix argument it undoes a |
| 10657 | specified number of operations. The undo history is cleared only by the | 10643 | specified number of operations. The undo history is cleared only by the |
| 10658 | @kbd{q} (@code{calc-quit}) command. (Recall that @kbd{M-# c} is | 10644 | @kbd{q} (@code{calc-quit}) command. (Recall that @kbd{C-x * c} is |
| 10659 | synonymous with @code{calc-quit} while inside the Calculator; this | 10645 | synonymous with @code{calc-quit} while inside the Calculator; this |
| 10660 | also clears the undo history.) | 10646 | also clears the undo history.) |
| 10661 | 10647 | ||
| @@ -10731,7 +10717,7 @@ that you must always press @kbd{w} yourself to see the messages). | |||
| 10731 | @pindex another-calc | 10717 | @pindex another-calc |
| 10732 | It is possible to have any number of Calc mode buffers at once. | 10718 | It is possible to have any number of Calc mode buffers at once. |
| 10733 | Usually this is done by executing @kbd{M-x another-calc}, which | 10719 | Usually this is done by executing @kbd{M-x another-calc}, which |
| 10734 | is similar to @kbd{M-# c} except that if a @samp{*Calculator*} | 10720 | is similar to @kbd{C-x * c} except that if a @samp{*Calculator*} |
| 10735 | buffer already exists, a new, independent one with a name of the | 10721 | buffer already exists, a new, independent one with a name of the |
| 10736 | form @samp{*Calculator*<@var{n}>} is created. You can also use the | 10722 | form @samp{*Calculator*<@var{n}>} is created. You can also use the |
| 10737 | command @code{calc-mode} to put any buffer into Calculator mode, but | 10723 | command @code{calc-mode} to put any buffer into Calculator mode, but |
| @@ -10778,9 +10764,9 @@ Occasionally Calc may lose track of when a certain component is | |||
| 10778 | necessary; typically this means you will type a command and it won't | 10764 | necessary; typically this means you will type a command and it won't |
| 10779 | work because some function you've never heard of was undefined. | 10765 | work because some function you've never heard of was undefined. |
| 10780 | 10766 | ||
| 10781 | @kindex M-# L | 10767 | @kindex C-x * L |
| 10782 | @pindex calc-load-everything | 10768 | @pindex calc-load-everything |
| 10783 | If this happens, the easiest workaround is to type @kbd{M-# L} | 10769 | If this happens, the easiest workaround is to type @kbd{C-x * L} |
| 10784 | (@code{calc-load-everything}) to force all the parts of Calc to be | 10770 | (@code{calc-load-everything}) to force all the parts of Calc to be |
| 10785 | loaded right away. This will cause Emacs to take up a lot more | 10771 | loaded right away. This will cause Emacs to take up a lot more |
| 10786 | memory than it would otherwise, but it's guaranteed to fix the problem. | 10772 | memory than it would otherwise, but it's guaranteed to fix the problem. |
| @@ -10839,7 +10825,7 @@ data points computed by the graphing commands. | |||
| 10839 | If you suspect a Calculator cache has become corrupt, you can use the | 10825 | If you suspect a Calculator cache has become corrupt, you can use the |
| 10840 | @code{calc-flush-caches} command to reset all caches to the empty state. | 10826 | @code{calc-flush-caches} command to reset all caches to the empty state. |
| 10841 | (This should only be necessary in the event of bugs in the Calculator.) | 10827 | (This should only be necessary in the event of bugs in the Calculator.) |
| 10842 | The @kbd{M-# 0} (with the zero key) command also resets caches along | 10828 | The @kbd{C-x * 0} (with the zero key) command also resets caches along |
| 10843 | with all other aspects of the Calculator's state. | 10829 | with all other aspects of the Calculator's state. |
| 10844 | 10830 | ||
| 10845 | @node Debugging Calc, , Caches, Troubleshooting Commands | 10831 | @node Debugging Calc, , Caches, Troubleshooting Commands |
| @@ -12049,8 +12035,8 @@ represent the same operation. | |||
| 12049 | 12035 | ||
| 12050 | Commands that interpret (``parse'') text as algebraic formulas include | 12036 | Commands that interpret (``parse'') text as algebraic formulas include |
| 12051 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse | 12037 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse |
| 12052 | the contents of the editing buffer when you finish, the @kbd{M-# g} | 12038 | the contents of the editing buffer when you finish, the @kbd{C-x * g} |
| 12053 | and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system | 12039 | and @w{@kbd{C-x * r}} commands, the @kbd{C-y} command, the X window system |
| 12054 | ``paste'' mouse operation, and Embedded mode. All of these operations | 12040 | ``paste'' mouse operation, and Embedded mode. All of these operations |
| 12055 | use the same rules for parsing formulas; in particular, language modes | 12041 | use the same rules for parsing formulas; in particular, language modes |
| 12056 | (@pxref{Language Modes}) affect them all in the same way. | 12042 | (@pxref{Language Modes}) affect them all in the same way. |
| @@ -12446,8 +12432,8 @@ This will cause Emacs to reestablish these modes each time it starts up. | |||
| 12446 | The modes saved in the file include everything controlled by the @kbd{m} | 12432 | The modes saved in the file include everything controlled by the @kbd{m} |
| 12447 | and @kbd{d} prefix keys, the current precision and binary word size, | 12433 | and @kbd{d} prefix keys, the current precision and binary word size, |
| 12448 | whether or not the trail is displayed, the current height of the Calc | 12434 | whether or not the trail is displayed, the current height of the Calc |
| 12449 | window, and more. The current interface (used when you type @kbd{M-# | 12435 | window, and more. The current interface (used when you type @kbd{C-x * *}) |
| 12450 | M-#}) is also saved. If there were already saved mode settings in the | 12436 | is also saved. If there were already saved mode settings in the |
| 12451 | file, they are replaced. Otherwise, the new mode information is | 12437 | file, they are replaced. Otherwise, the new mode information is |
| 12452 | appended to the end of the file. | 12438 | appended to the end of the file. |
| 12453 | 12439 | ||
| @@ -12473,7 +12459,7 @@ if this file exists, and this file becomes the one that Calc will | |||
| 12473 | use in the future for commands like @kbd{m m}. The default settings | 12459 | use in the future for commands like @kbd{m m}. The default settings |
| 12474 | file name is @file{~/.calc.el}. You can see the current file name by | 12460 | file name is @file{~/.calc.el}. You can see the current file name by |
| 12475 | giving a blank response to the @kbd{m F} prompt. See also the | 12461 | giving a blank response to the @kbd{m F} prompt. See also the |
| 12476 | discussion of the @code{calc-settings-file} variable; @pxref{Customizable Variables}. | 12462 | discussion of the @code{calc-settings-file} variable; @pxref{Customizing Calc}. |
| 12477 | 12463 | ||
| 12478 | If the file name you give is your user init file (typically | 12464 | If the file name you give is your user init file (typically |
| 12479 | @file{~/.emacs}), @kbd{m F} will not automatically load the new file. This | 12465 | @file{~/.emacs}), @kbd{m F} will not automatically load the new file. This |
| @@ -12494,7 +12480,7 @@ extensions modules. Otherwise, the extensions modules will not be loaded | |||
| 12494 | until the various advanced Calc features are used. Since this mode only | 12480 | until the various advanced Calc features are used. Since this mode only |
| 12495 | has effect when Calc is first loaded, @kbd{m x} is usually followed by | 12481 | has effect when Calc is first loaded, @kbd{m x} is usually followed by |
| 12496 | @kbd{m m} to make the mode-setting permanent. To load all of Calc just | 12482 | @kbd{m m} to make the mode-setting permanent. To load all of Calc just |
| 12497 | once, rather than always in the future, you can press @kbd{M-# L}. | 12483 | once, rather than always in the future, you can press @kbd{C-x * L}. |
| 12498 | 12484 | ||
| 12499 | @kindex m S | 12485 | @kindex m S |
| 12500 | @pindex calc-shift-prefix | 12486 | @pindex calc-shift-prefix |
| @@ -12864,7 +12850,7 @@ recomputation is off, you can think of @kbd{m C m C} as a command | |||
| 12864 | to update all @samp{=>} operators while leaving recomputation off.) | 12850 | to update all @samp{=>} operators while leaving recomputation off.) |
| 12865 | 12851 | ||
| 12866 | To update @samp{=>} operators in an Embedded buffer while | 12852 | To update @samp{=>} operators in an Embedded buffer while |
| 12867 | automatic recomputation is off, use @w{@kbd{M-# u}}. | 12853 | automatic recomputation is off, use @w{@kbd{C-x * u}}. |
| 12868 | @xref{Embedded Mode}. | 12854 | @xref{Embedded Mode}. |
| 12869 | 12855 | ||
| 12870 | @node Working Message, , Automatic Recomputation, Calculation Modes | 12856 | @node Working Message, , Automatic Recomputation, Calculation Modes |
| @@ -13511,7 +13497,7 @@ uses it as the digit separator. As a special case, @kbd{d , \} selects | |||
| 13511 | @samp{\,} (@TeX{}'s thin-space symbol) as the digit separator. | 13497 | @samp{\,} (@TeX{}'s thin-space symbol) as the digit separator. |
| 13512 | 13498 | ||
| 13513 | Please note that grouped numbers will not generally be parsed correctly | 13499 | Please note that grouped numbers will not generally be parsed correctly |
| 13514 | if re-read in textual form, say by the use of @kbd{M-# y} and @kbd{M-# g}. | 13500 | if re-read in textual form, say by the use of @kbd{C-x * y} and @kbd{C-x * g}. |
| 13515 | (@xref{Kill and Yank}, for details on these commands.) One exception is | 13501 | (@xref{Kill and Yank}, for details on these commands.) One exception is |
| 13516 | the @samp{\,} separator, which doesn't interfere with parsing because it | 13502 | the @samp{\,} separator, which doesn't interfere with parsing because it |
| 13517 | is ignored by @TeX{} language mode. | 13503 | is ignored by @TeX{} language mode. |
| @@ -13571,7 +13557,7 @@ significant figures but displays only six. (In fact, intermediate | |||
| 13571 | calculations are often carried to one or two more significant figures, | 13557 | calculations are often carried to one or two more significant figures, |
| 13572 | but values placed on the stack will be rounded down to ten figures.) | 13558 | but values placed on the stack will be rounded down to ten figures.) |
| 13573 | Numbers are never actually rounded to the display precision for storage, | 13559 | Numbers are never actually rounded to the display precision for storage, |
| 13574 | except by commands like @kbd{C-k} and @kbd{M-# y} which operate on the | 13560 | except by commands like @kbd{C-k} and @kbd{C-x * y} which operate on the |
| 13575 | actual displayed text in the Calculator buffer. | 13561 | actual displayed text in the Calculator buffer. |
| 13576 | 13562 | ||
| 13577 | @kindex d . | 13563 | @kindex d . |
| @@ -14133,9 +14119,9 @@ and use the standard notation by giving a numeric prefix, e.g., @kbd{C-u '}. | |||
| 14133 | For example, suppose the formula @samp{2*a[1] + atan(a[2])} occurs in a C | 14119 | For example, suppose the formula @samp{2*a[1] + atan(a[2])} occurs in a C |
| 14134 | program; elsewhere in the program you need the derivatives of this formula | 14120 | program; elsewhere in the program you need the derivatives of this formula |
| 14135 | with respect to @samp{a[1]} and @samp{a[2]}. First, type @kbd{d C} | 14121 | with respect to @samp{a[1]} and @samp{a[2]}. First, type @kbd{d C} |
| 14136 | to switch to C notation. Now use @code{C-u M-# g} to grab the formula | 14122 | to switch to C notation. Now use @code{C-u C-x * g} to grab the formula |
| 14137 | into the Calculator, @kbd{a d a[1] @key{RET}} to differentiate with respect | 14123 | into the Calculator, @kbd{a d a[1] @key{RET}} to differentiate with respect |
| 14138 | to the first variable, and @kbd{M-# y} to yank the formula for the derivative | 14124 | to the first variable, and @kbd{C-x * y} to yank the formula for the derivative |
| 14139 | back into your C program. Press @kbd{U} to undo the differentiation and | 14125 | back into your C program. Press @kbd{U} to undo the differentiation and |
| 14140 | repeat with @kbd{a d a[2] @key{RET}} for the other derivative. | 14126 | repeat with @kbd{a d a[2] @key{RET}} for the other derivative. |
| 14141 | 14127 | ||
| @@ -21278,8 +21264,8 @@ but they are not currently supported with @kbd{V U} or @kbd{I V U}. | |||
| 21278 | The obsolete reduce-by-columns function, @code{reducec}, is still | 21264 | The obsolete reduce-by-columns function, @code{reducec}, is still |
| 21279 | supported but there is no way to get it through the @kbd{V R} command. | 21265 | supported but there is no way to get it through the @kbd{V R} command. |
| 21280 | 21266 | ||
| 21281 | The commands @kbd{M-# :} and @kbd{M-# _} are equivalent to typing | 21267 | The commands @kbd{C-x * :} and @kbd{C-x * _} are equivalent to typing |
| 21282 | @kbd{M-# r} to grab a rectangle of data into Calc, and then typing | 21268 | @kbd{C-x * r} to grab a rectangle of data into Calc, and then typing |
| 21283 | @kbd{V R : +} or @kbd{V R _ +}, respectively, to sum the columns or | 21269 | @kbd{V R : +} or @kbd{V R _ +}, respectively, to sum the columns or |
| 21284 | rows of the matrix. @xref{Grabbing From Buffers}. | 21270 | rows of the matrix. @xref{Grabbing From Buffers}. |
| 21285 | 21271 | ||
| @@ -27934,7 +27920,7 @@ argument to @kbd{u v}. | |||
| 27934 | The @kbd{u V} (@code{calc-view-units-table}) command is like @kbd{u v} except | 27920 | The @kbd{u V} (@code{calc-view-units-table}) command is like @kbd{u v} except |
| 27935 | that the cursor is not moved into the Units Table buffer. You can | 27921 | that the cursor is not moved into the Units Table buffer. You can |
| 27936 | type @kbd{u V} again to remove the Units Table from the display. To | 27922 | type @kbd{u V} again to remove the Units Table from the display. To |
| 27937 | return from the Units Table buffer after a @kbd{u v}, type @kbd{M-# c} | 27923 | return from the Units Table buffer after a @kbd{u v}, type @kbd{C-x * c} |
| 27938 | again or use the regular Emacs @w{@kbd{C-x o}} (@code{other-window}) | 27924 | again or use the regular Emacs @w{@kbd{C-x o}} (@code{other-window}) |
| 27939 | command. You can also kill the buffer with @kbd{C-x k} if you wish; | 27925 | command. You can also kill the buffer with @kbd{C-x k} if you wish; |
| 27940 | the actual units table is safely stored inside the Calculator. | 27926 | the actual units table is safely stored inside the Calculator. |
| @@ -29320,7 +29306,7 @@ display or print the output of GNUPLOT, respectively. These may be | |||
| 29320 | @samp{%s} to signify the name of the file to be displayed or printed. | 29306 | @samp{%s} to signify the name of the file to be displayed or printed. |
| 29321 | Or, these variables may contain Lisp expressions which are evaluated | 29307 | Or, these variables may contain Lisp expressions which are evaluated |
| 29322 | to display or print the output. These variables are customizable | 29308 | to display or print the output. These variables are customizable |
| 29323 | (@pxref{Customizable Variables}). | 29309 | (@pxref{Customizing Calc}). |
| 29324 | 29310 | ||
| 29325 | @kindex g x | 29311 | @kindex g x |
| 29326 | @pindex calc-graph-display | 29312 | @pindex calc-graph-display |
| @@ -29479,20 +29465,20 @@ difference.) | |||
| 29479 | @section Grabbing from Other Buffers | 29465 | @section Grabbing from Other Buffers |
| 29480 | 29466 | ||
| 29481 | @noindent | 29467 | @noindent |
| 29482 | @kindex M-# g | 29468 | @kindex C-x * g |
| 29483 | @pindex calc-grab-region | 29469 | @pindex calc-grab-region |
| 29484 | The @kbd{M-# g} (@code{calc-grab-region}) command takes the text between | 29470 | The @kbd{C-x * g} (@code{calc-grab-region}) command takes the text between |
| 29485 | point and mark in the current buffer and attempts to parse it as a | 29471 | point and mark in the current buffer and attempts to parse it as a |
| 29486 | vector of values. Basically, it wraps the text in vector brackets | 29472 | vector of values. Basically, it wraps the text in vector brackets |
| 29487 | @samp{[ ]} unless the text already is enclosed in vector brackets, | 29473 | @samp{[ ]} unless the text already is enclosed in vector brackets, |
| 29488 | then reads the text as if it were an algebraic entry. The contents | 29474 | then reads the text as if it were an algebraic entry. The contents |
| 29489 | of the vector may be numbers, formulas, or any other Calc objects. | 29475 | of the vector may be numbers, formulas, or any other Calc objects. |
| 29490 | If the @kbd{M-# g} command works successfully, it does an automatic | 29476 | If the @kbd{C-x * g} command works successfully, it does an automatic |
| 29491 | @kbd{M-# c} to enter the Calculator buffer. | 29477 | @kbd{C-x * c} to enter the Calculator buffer. |
| 29492 | 29478 | ||
| 29493 | A numeric prefix argument grabs the specified number of lines around | 29479 | A numeric prefix argument grabs the specified number of lines around |
| 29494 | point, ignoring the mark. A positive prefix grabs from point to the | 29480 | point, ignoring the mark. A positive prefix grabs from point to the |
| 29495 | @expr{n}th following newline (so that @kbd{M-1 M-# g} grabs from point | 29481 | @expr{n}th following newline (so that @kbd{M-1 C-x * g} grabs from point |
| 29496 | to the end of the current line); a negative prefix grabs from point | 29482 | to the end of the current line); a negative prefix grabs from point |
| 29497 | back to the @expr{n+1}st preceding newline. In these cases the text | 29483 | back to the @expr{n+1}st preceding newline. In these cases the text |
| 29498 | that is grabbed is exactly the same as the text that @kbd{C-k} would | 29484 | that is grabbed is exactly the same as the text that @kbd{C-k} would |
| @@ -29503,19 +29489,19 @@ line. | |||
| 29503 | 29489 | ||
| 29504 | A plain @kbd{C-u} prefix interprets the region between point and mark | 29490 | A plain @kbd{C-u} prefix interprets the region between point and mark |
| 29505 | as a single number or formula rather than a vector. For example, | 29491 | as a single number or formula rather than a vector. For example, |
| 29506 | @kbd{M-# g} on the text @samp{2 a b} produces the vector of three | 29492 | @kbd{C-x * g} on the text @samp{2 a b} produces the vector of three |
| 29507 | values @samp{[2, a, b]}, but @kbd{C-u M-# g} on the same region | 29493 | values @samp{[2, a, b]}, but @kbd{C-u C-x * g} on the same region |
| 29508 | reads a formula which is a product of three things: @samp{2 a b}. | 29494 | reads a formula which is a product of three things: @samp{2 a b}. |
| 29509 | (The text @samp{a + b}, on the other hand, will be grabbed as a | 29495 | (The text @samp{a + b}, on the other hand, will be grabbed as a |
| 29510 | vector of one element by plain @kbd{M-# g} because the interpretation | 29496 | vector of one element by plain @kbd{C-x * g} because the interpretation |
| 29511 | @samp{[a, +, b]} would be a syntax error.) | 29497 | @samp{[a, +, b]} would be a syntax error.) |
| 29512 | 29498 | ||
| 29513 | If a different language has been specified (@pxref{Language Modes}), | 29499 | If a different language has been specified (@pxref{Language Modes}), |
| 29514 | the grabbed text will be interpreted according to that language. | 29500 | the grabbed text will be interpreted according to that language. |
| 29515 | 29501 | ||
| 29516 | @kindex M-# r | 29502 | @kindex C-x * r |
| 29517 | @pindex calc-grab-rectangle | 29503 | @pindex calc-grab-rectangle |
| 29518 | The @kbd{M-# r} (@code{calc-grab-rectangle}) command takes the text between | 29504 | The @kbd{C-x * r} (@code{calc-grab-rectangle}) command takes the text between |
| 29519 | point and mark and attempts to parse it as a matrix. If point and mark | 29505 | point and mark and attempts to parse it as a matrix. If point and mark |
| 29520 | are both in the leftmost column, the lines in between are parsed in their | 29506 | are both in the leftmost column, the lines in between are parsed in their |
| 29521 | entirety. Otherwise, point and mark define the corners of a rectangle | 29507 | entirety. Otherwise, point and mark define the corners of a rectangle |
| @@ -29535,15 +29521,15 @@ were surrounded by square brackets. Leading line numbers (in the | |||
| 29535 | format used in the Calc stack buffer) are ignored. If you wish to | 29521 | format used in the Calc stack buffer) are ignored. If you wish to |
| 29536 | force this interpretation (even if the line contains bracketed | 29522 | force this interpretation (even if the line contains bracketed |
| 29537 | portions), give a negative numeric prefix argument to the | 29523 | portions), give a negative numeric prefix argument to the |
| 29538 | @kbd{M-# r} command. | 29524 | @kbd{C-x * r} command. |
| 29539 | 29525 | ||
| 29540 | If you give a numeric prefix argument of zero or plain @kbd{C-u}, each | 29526 | If you give a numeric prefix argument of zero or plain @kbd{C-u}, each |
| 29541 | line is instead interpreted as a single formula which is converted into | 29527 | line is instead interpreted as a single formula which is converted into |
| 29542 | a one-element vector. Thus the result of @kbd{C-u M-# r} will be a | 29528 | a one-element vector. Thus the result of @kbd{C-u C-x * r} will be a |
| 29543 | one-column matrix. For example, suppose one line of the data is the | 29529 | one-column matrix. For example, suppose one line of the data is the |
| 29544 | expression @samp{2 a}. A plain @w{@kbd{M-# r}} will interpret this as | 29530 | expression @samp{2 a}. A plain @w{@kbd{C-x * r}} will interpret this as |
| 29545 | @samp{[2 a]}, which in turn is read as a two-element vector that forms | 29531 | @samp{[2 a]}, which in turn is read as a two-element vector that forms |
| 29546 | one row of the matrix. But a @kbd{C-u M-# r} will interpret this row | 29532 | one row of the matrix. But a @kbd{C-u C-x * r} will interpret this row |
| 29547 | as @samp{[2*a]}. | 29533 | as @samp{[2*a]}. |
| 29548 | 29534 | ||
| 29549 | If you give a positive numeric prefix argument @var{n}, then each line | 29535 | If you give a positive numeric prefix argument @var{n}, then each line |
| @@ -29558,35 +29544,35 @@ constituent rows and columns. (If it is a | |||
| 29558 | @infoline 1x1 | 29544 | @infoline 1x1 |
| 29559 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) | 29545 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) |
| 29560 | 29546 | ||
| 29561 | @kindex M-# : | 29547 | @kindex C-x * : |
| 29562 | @kindex M-# _ | 29548 | @kindex C-x * _ |
| 29563 | @pindex calc-grab-sum-across | 29549 | @pindex calc-grab-sum-across |
| 29564 | @pindex calc-grab-sum-down | 29550 | @pindex calc-grab-sum-down |
| 29565 | @cindex Summing rows and columns of data | 29551 | @cindex Summing rows and columns of data |
| 29566 | The @kbd{M-# :} (@code{calc-grab-sum-down}) command is a handy way to | 29552 | The @kbd{C-x * :} (@code{calc-grab-sum-down}) command is a handy way to |
| 29567 | grab a rectangle of data and sum its columns. It is equivalent to | 29553 | grab a rectangle of data and sum its columns. It is equivalent to |
| 29568 | typing @kbd{M-# r}, followed by @kbd{V R : +} (the vector reduction | 29554 | typing @kbd{C-x * r}, followed by @kbd{V R : +} (the vector reduction |
| 29569 | command that sums the columns of a matrix; @pxref{Reducing}). The | 29555 | command that sums the columns of a matrix; @pxref{Reducing}). The |
| 29570 | result of the command will be a vector of numbers, one for each column | 29556 | result of the command will be a vector of numbers, one for each column |
| 29571 | in the input data. The @kbd{M-# _} (@code{calc-grab-sum-across}) command | 29557 | in the input data. The @kbd{C-x * _} (@code{calc-grab-sum-across}) command |
| 29572 | similarly grabs a rectangle and sums its rows by executing @w{@kbd{V R _ +}}. | 29558 | similarly grabs a rectangle and sums its rows by executing @w{@kbd{V R _ +}}. |
| 29573 | 29559 | ||
| 29574 | As well as being more convenient, @kbd{M-# :} and @kbd{M-# _} are also | 29560 | As well as being more convenient, @kbd{C-x * :} and @kbd{C-x * _} are also |
| 29575 | much faster because they don't actually place the grabbed vector on | 29561 | much faster because they don't actually place the grabbed vector on |
| 29576 | the stack. In a @kbd{M-# r V R : +} sequence, formatting the vector | 29562 | the stack. In a @kbd{C-x * r V R : +} sequence, formatting the vector |
| 29577 | for display on the stack takes a large fraction of the total time | 29563 | for display on the stack takes a large fraction of the total time |
| 29578 | (unless you have planned ahead and used @kbd{v .} and @kbd{t .} modes). | 29564 | (unless you have planned ahead and used @kbd{v .} and @kbd{t .} modes). |
| 29579 | 29565 | ||
| 29580 | For example, suppose we have a column of numbers in a file which we | 29566 | For example, suppose we have a column of numbers in a file which we |
| 29581 | wish to sum. Go to one corner of the column and press @kbd{C-@@} to | 29567 | wish to sum. Go to one corner of the column and press @kbd{C-@@} to |
| 29582 | set the mark; go to the other corner and type @kbd{M-# :}. Since there | 29568 | set the mark; go to the other corner and type @kbd{C-x * :}. Since there |
| 29583 | is only one column, the result will be a vector of one number, the sum. | 29569 | is only one column, the result will be a vector of one number, the sum. |
| 29584 | (You can type @kbd{v u} to unpack this vector into a plain number if | 29570 | (You can type @kbd{v u} to unpack this vector into a plain number if |
| 29585 | you want to do further arithmetic with it.) | 29571 | you want to do further arithmetic with it.) |
| 29586 | 29572 | ||
| 29587 | To compute the product of the column of numbers, we would have to do | 29573 | To compute the product of the column of numbers, we would have to do |
| 29588 | it ``by hand'' since there's no special grab-and-multiply command. | 29574 | it ``by hand'' since there's no special grab-and-multiply command. |
| 29589 | Use @kbd{M-# r} to grab the column of numbers into the calculator in | 29575 | Use @kbd{C-x * r} to grab the column of numbers into the calculator in |
| 29590 | the form of a column matrix. The statistics command @kbd{u *} is a | 29576 | the form of a column matrix. The statistics command @kbd{u *} is a |
| 29591 | handy way to find the product of a vector or matrix of numbers. | 29577 | handy way to find the product of a vector or matrix of numbers. |
| 29592 | @xref{Statistical Operations}. Another approach would be to use | 29578 | @xref{Statistical Operations}. Another approach would be to use |
| @@ -29618,13 +29604,13 @@ latter strips off the trailing newline. | |||
| 29618 | With a lone @kbd{C-u} as a prefix argument, @kbd{y} @emph{replaces} the | 29604 | With a lone @kbd{C-u} as a prefix argument, @kbd{y} @emph{replaces} the |
| 29619 | region in the other buffer with the yanked text, then quits the | 29605 | region in the other buffer with the yanked text, then quits the |
| 29620 | Calculator, leaving you in that buffer. A typical use would be to use | 29606 | Calculator, leaving you in that buffer. A typical use would be to use |
| 29621 | @kbd{M-# g} to read a region of data into the Calculator, operate on the | 29607 | @kbd{C-x * g} to read a region of data into the Calculator, operate on the |
| 29622 | data to produce a new matrix, then type @kbd{C-u y} to replace the | 29608 | data to produce a new matrix, then type @kbd{C-u y} to replace the |
| 29623 | original data with the new data. One might wish to alter the matrix | 29609 | original data with the new data. One might wish to alter the matrix |
| 29624 | display style (@pxref{Vector and Matrix Formats}) or change the current | 29610 | display style (@pxref{Vector and Matrix Formats}) or change the current |
| 29625 | display language (@pxref{Language Modes}) before doing this. Also, note | 29611 | display language (@pxref{Language Modes}) before doing this. Also, note |
| 29626 | that this command replaces a linear region of text (as grabbed by | 29612 | that this command replaces a linear region of text (as grabbed by |
| 29627 | @kbd{M-# g}), not a rectangle (as grabbed by @kbd{M-# r}). | 29613 | @kbd{C-x * g}), not a rectangle (as grabbed by @kbd{C-x * r}). |
| 29628 | 29614 | ||
| 29629 | If the editing buffer is in overwrite (as opposed to insert) mode, | 29615 | If the editing buffer is in overwrite (as opposed to insert) mode, |
| 29630 | and the @kbd{C-u} prefix was not used, then the yanked number will | 29616 | and the @kbd{C-u} prefix was not used, then the yanked number will |
| @@ -29641,8 +29627,8 @@ number, lengthening or shortening as necessary. The concept of | |||
| 29641 | ``overwrite mode'' has thus been generalized from overwriting characters | 29627 | ``overwrite mode'' has thus been generalized from overwriting characters |
| 29642 | to overwriting one complete number with another. | 29628 | to overwriting one complete number with another. |
| 29643 | 29629 | ||
| 29644 | @kindex M-# y | 29630 | @kindex C-x * y |
| 29645 | The @kbd{M-# y} key sequence is equivalent to @kbd{y} except that | 29631 | The @kbd{C-x * y} key sequence is equivalent to @kbd{y} except that |
| 29646 | it can be typed anywhere, not just in Calc. This provides an easy | 29632 | it can be typed anywhere, not just in Calc. This provides an easy |
| 29647 | way to guarantee that Calc knows which editing buffer you want to use! | 29633 | way to guarantee that Calc knows which editing buffer you want to use! |
| 29648 | 29634 | ||
| @@ -29679,9 +29665,9 @@ in the Calc window. | |||
| 29679 | @chapter Keypad Mode | 29665 | @chapter Keypad Mode |
| 29680 | 29666 | ||
| 29681 | @noindent | 29667 | @noindent |
| 29682 | @kindex M-# k | 29668 | @kindex C-x * k |
| 29683 | @pindex calc-keypad | 29669 | @pindex calc-keypad |
| 29684 | The @kbd{M-# k} (@code{calc-keypad}) command starts the Calculator | 29670 | The @kbd{C-x * k} (@code{calc-keypad}) command starts the Calculator |
| 29685 | and displays a picture of a calculator-style keypad. If you are using | 29671 | and displays a picture of a calculator-style keypad. If you are using |
| 29686 | the X window system, you can click on any of the ``keys'' in the | 29672 | the X window system, you can click on any of the ``keys'' in the |
| 29687 | keypad using the left mouse button to operate the calculator. | 29673 | keypad using the left mouse button to operate the calculator. |
| @@ -29690,7 +29676,7 @@ you can type in your file while simultaneously performing | |||
| 29690 | calculations with the mouse. | 29676 | calculations with the mouse. |
| 29691 | 29677 | ||
| 29692 | @pindex full-calc-keypad | 29678 | @pindex full-calc-keypad |
| 29693 | If you have used @kbd{M-# b} first, @kbd{M-# k} instead invokes | 29679 | If you have used @kbd{C-x * b} first, @kbd{C-x * k} instead invokes |
| 29694 | the @code{full-calc-keypad} command, which takes over the whole | 29680 | the @code{full-calc-keypad} command, which takes over the whole |
| 29695 | Emacs screen and displays the keypad, the Calc stack, and the Calc | 29681 | Emacs screen and displays the keypad, the Calc stack, and the Calc |
| 29696 | trail all at once. This mode would normally be used when running | 29682 | trail all at once. This mode would normally be used when running |
| @@ -29851,9 +29837,9 @@ of 0 @samp{[]}, 1 @samp{[)}, 2 @samp{(]} or 3 @samp{()}, followed | |||
| 29851 | by the two limits of the interval. | 29837 | by the two limits of the interval. |
| 29852 | @end table | 29838 | @end table |
| 29853 | 29839 | ||
| 29854 | The @kbd{OFF} key turns Calc off; typing @kbd{M-# k} or @kbd{M-# M-#} | 29840 | The @kbd{OFF} key turns Calc off; typing @kbd{C-x * k} or @kbd{C-x * *} |
| 29855 | again has the same effect. This is analogous to typing @kbd{q} or | 29841 | again has the same effect. This is analogous to typing @kbd{q} or |
| 29856 | hitting @kbd{M-# c} again in the normal calculator. If Calc is | 29842 | hitting @kbd{C-x * c} again in the normal calculator. If Calc is |
| 29857 | running standalone (the @code{full-calc-keypad} command appeared in the | 29843 | running standalone (the @code{full-calc-keypad} command appeared in the |
| 29858 | command line that started Emacs), then @kbd{OFF} is replaced with | 29844 | command line that started Emacs), then @kbd{OFF} is replaced with |
| 29859 | @kbd{EXIT}; clicking on this actually exits Emacs itself. | 29845 | @kbd{EXIT}; clicking on this actually exits Emacs itself. |
| @@ -30093,11 +30079,11 @@ linked to the stack and this copying is taken care of automatically. | |||
| 30093 | @section Basic Embedded Mode | 30079 | @section Basic Embedded Mode |
| 30094 | 30080 | ||
| 30095 | @noindent | 30081 | @noindent |
| 30096 | @kindex M-# e | 30082 | @kindex C-x * e |
| 30097 | @pindex calc-embedded | 30083 | @pindex calc-embedded |
| 30098 | To enter Embedded mode, position the Emacs point (cursor) on a | 30084 | To enter Embedded mode, position the Emacs point (cursor) on a |
| 30099 | formula in any buffer and press @kbd{M-# e} (@code{calc-embedded}). | 30085 | formula in any buffer and press @kbd{C-x * e} (@code{calc-embedded}). |
| 30100 | Note that @kbd{M-# e} is not to be used in the Calc stack buffer | 30086 | Note that @kbd{C-x * e} is not to be used in the Calc stack buffer |
| 30101 | like most Calc commands, but rather in regular editing buffers that | 30087 | like most Calc commands, but rather in regular editing buffers that |
| 30102 | are visiting your own files. | 30088 | are visiting your own files. |
| 30103 | 30089 | ||
| @@ -30108,7 +30094,7 @@ Similarly, Calc will use @TeX{} language for @code{tex-mode}, | |||
| 30108 | @code{plain-tex-mode} and @code{context-mode}, C language for | 30094 | @code{plain-tex-mode} and @code{context-mode}, C language for |
| 30109 | @code{c-mode} and @code{c++-mode}, FORTRAN language for | 30095 | @code{c-mode} and @code{c++-mode}, FORTRAN language for |
| 30110 | @code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, | 30096 | @code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, |
| 30111 | and eqn for @code{nroff-mode} (@pxref{Customizable Variables}). | 30097 | and eqn for @code{nroff-mode} (@pxref{Customizing Calc}). |
| 30112 | These can be overridden with Calc's mode | 30098 | These can be overridden with Calc's mode |
| 30113 | changing commands (@pxref{Mode Settings in Embedded Mode}). If no | 30099 | changing commands (@pxref{Mode Settings in Embedded Mode}). If no |
| 30114 | suitable language is available, Calc will continue with its current language. | 30100 | suitable language is available, Calc will continue with its current language. |
| @@ -30145,9 +30131,9 @@ With a prefix argument of zero, Calc uses the current region (delimited | |||
| 30145 | by point and mark) instead of formula delimiters. With a prefix | 30131 | by point and mark) instead of formula delimiters. With a prefix |
| 30146 | argument of @kbd{C-u} only, Calc uses the current line as the formula. | 30132 | argument of @kbd{C-u} only, Calc uses the current line as the formula. |
| 30147 | 30133 | ||
| 30148 | @kindex M-# w | 30134 | @kindex C-x * w |
| 30149 | @pindex calc-embedded-word | 30135 | @pindex calc-embedded-word |
| 30150 | The @kbd{M-# w} (@code{calc-embedded-word}) command will start Embedded | 30136 | The @kbd{C-x * w} (@code{calc-embedded-word}) command will start Embedded |
| 30151 | mode on the current ``word''; in this case Calc will scan for the first | 30137 | mode on the current ``word''; in this case Calc will scan for the first |
| 30152 | non-numeric character (i.e., the first character that is not a digit, | 30138 | non-numeric character (i.e., the first character that is not a digit, |
| 30153 | sign, decimal point, or upper- or lower-case @samp{e}) forward and | 30139 | sign, decimal point, or upper- or lower-case @samp{e}) forward and |
| @@ -30165,7 +30151,7 @@ in Normal language mode, but the @code{atan} won't correspond to | |||
| 30165 | the built-in @code{arctan} function, and the @samp{a[1]} will be | 30151 | the built-in @code{arctan} function, and the @samp{a[1]} will be |
| 30166 | interpreted as @samp{a} times the vector @samp{[1]}! | 30152 | interpreted as @samp{a} times the vector @samp{[1]}! |
| 30167 | 30153 | ||
| 30168 | If you press @kbd{M-# e} or @kbd{M-# w} to activate an embedded | 30154 | If you press @kbd{C-x * e} or @kbd{C-x * w} to activate an embedded |
| 30169 | formula which is blank, say with the cursor on the space between | 30155 | formula which is blank, say with the cursor on the space between |
| 30170 | the two delimiters @samp{$ $}, Calc will immediately prompt for | 30156 | the two delimiters @samp{$ $}, Calc will immediately prompt for |
| 30171 | an algebraic entry. | 30157 | an algebraic entry. |
| @@ -30179,10 +30165,10 @@ not affected by Embedded mode. | |||
| 30179 | When Embedded mode begins, Calc pushes the current formula onto | 30165 | When Embedded mode begins, Calc pushes the current formula onto |
| 30180 | the stack. No Calc stack window is created; however, Calc copies | 30166 | the stack. No Calc stack window is created; however, Calc copies |
| 30181 | the top-of-stack position into the original buffer at all times. | 30167 | the top-of-stack position into the original buffer at all times. |
| 30182 | You can create a Calc window by hand with @kbd{M-# o} if you | 30168 | You can create a Calc window by hand with @kbd{C-x * o} if you |
| 30183 | find you need to see the entire stack. | 30169 | find you need to see the entire stack. |
| 30184 | 30170 | ||
| 30185 | For example, typing @kbd{M-# e} while somewhere in the formula | 30171 | For example, typing @kbd{C-x * e} while somewhere in the formula |
| 30186 | @samp{n>2} in the following line enables Embedded mode on that | 30172 | @samp{n>2} in the following line enables Embedded mode on that |
| 30187 | inequality: | 30173 | inequality: |
| 30188 | 30174 | ||
| @@ -30216,7 +30202,7 @@ needs to be commuted. | |||
| 30216 | We define $F_n = F_(n-1)+F_(n-2)$ for all $2 < n$. | 30202 | We define $F_n = F_(n-1)+F_(n-2)$ for all $2 < n$. |
| 30217 | @end example | 30203 | @end example |
| 30218 | 30204 | ||
| 30219 | The @kbd{M-# o} command is a useful way to open a Calc window | 30205 | The @kbd{C-x * o} command is a useful way to open a Calc window |
| 30220 | without actually selecting that window. Giving this command | 30206 | without actually selecting that window. Giving this command |
| 30221 | verifies that @samp{2 < n} is also on the Calc stack. Typing | 30207 | verifies that @samp{2 < n} is also on the Calc stack. Typing |
| 30222 | @kbd{17 @key{RET}} would produce: | 30208 | @kbd{17 @key{RET}} would produce: |
| @@ -30232,9 +30218,9 @@ at this point will exchange the two stack values and restore | |||
| 30232 | normally see the stack in Embedded mode, it is still there and | 30218 | normally see the stack in Embedded mode, it is still there and |
| 30233 | it still operates in the same way. But, as with old-fashioned | 30219 | it still operates in the same way. But, as with old-fashioned |
| 30234 | RPN calculators, you can only see the value at the top of the | 30220 | RPN calculators, you can only see the value at the top of the |
| 30235 | stack at any given time (unless you use @kbd{M-# o}). | 30221 | stack at any given time (unless you use @kbd{C-x * o}). |
| 30236 | 30222 | ||
| 30237 | Typing @kbd{M-# e} again turns Embedded mode off. The Calc | 30223 | Typing @kbd{C-x * e} again turns Embedded mode off. The Calc |
| 30238 | window reveals that the formula @w{@samp{2 < n}} is automatically | 30224 | window reveals that the formula @w{@samp{2 < n}} is automatically |
| 30239 | removed from the stack, but the @samp{17} is not. Entering | 30225 | removed from the stack, but the @samp{17} is not. Entering |
| 30240 | Embedded mode always pushes one thing onto the stack, and | 30226 | Embedded mode always pushes one thing onto the stack, and |
| @@ -30242,11 +30228,11 @@ leaving Embedded mode always removes one thing. Anything else | |||
| 30242 | that happens on the stack is entirely your business as far as | 30228 | that happens on the stack is entirely your business as far as |
| 30243 | Embedded mode is concerned. | 30229 | Embedded mode is concerned. |
| 30244 | 30230 | ||
| 30245 | If you press @kbd{M-# e} in the wrong place by accident, it is | 30231 | If you press @kbd{C-x * e} in the wrong place by accident, it is |
| 30246 | possible that Calc will be able to parse the nearby text as a | 30232 | possible that Calc will be able to parse the nearby text as a |
| 30247 | formula and will mangle that text in an attempt to redisplay it | 30233 | formula and will mangle that text in an attempt to redisplay it |
| 30248 | ``properly'' in the current language mode. If this happens, | 30234 | ``properly'' in the current language mode. If this happens, |
| 30249 | press @kbd{M-# e} again to exit Embedded mode, then give the | 30235 | press @kbd{C-x * e} again to exit Embedded mode, then give the |
| 30250 | regular Emacs ``undo'' command (@kbd{C-_} or @kbd{C-x u}) to put | 30236 | regular Emacs ``undo'' command (@kbd{C-_} or @kbd{C-x u}) to put |
| 30251 | the text back the way it was before Calc edited it. Note that Calc's | 30237 | the text back the way it was before Calc edited it. Note that Calc's |
| 30252 | own Undo command (typed before you turn Embedded mode back off) | 30238 | own Undo command (typed before you turn Embedded mode back off) |
| @@ -30357,10 +30343,10 @@ and at x = 3 is | |||
| 30357 | @r{(the value)} | 30343 | @r{(the value)} |
| 30358 | @end smallexample | 30344 | @end smallexample |
| 30359 | 30345 | ||
| 30360 | @kindex M-# d | 30346 | @kindex C-x * d |
| 30361 | @pindex calc-embedded-duplicate | 30347 | @pindex calc-embedded-duplicate |
| 30362 | The @kbd{M-# d} (@code{calc-embedded-duplicate}) command is a | 30348 | The @kbd{C-x * d} (@code{calc-embedded-duplicate}) command is a |
| 30363 | handy way to make sequences like this. If you type @kbd{M-# d}, | 30349 | handy way to make sequences like this. If you type @kbd{C-x * d}, |
| 30364 | the formula under the cursor (which may or may not have Embedded | 30350 | the formula under the cursor (which may or may not have Embedded |
| 30365 | mode enabled for it at the time) is copied immediately below and | 30351 | mode enabled for it at the time) is copied immediately below and |
| 30366 | Embedded mode is then enabled for that copy. | 30352 | Embedded mode is then enabled for that copy. |
| @@ -30374,7 +30360,7 @@ The derivative of | |||
| 30374 | @end smallexample | 30360 | @end smallexample |
| 30375 | 30361 | ||
| 30376 | @noindent | 30362 | @noindent |
| 30377 | and press @kbd{M-# d} with the cursor on this formula. The result | 30363 | and press @kbd{C-x * d} with the cursor on this formula. The result |
| 30378 | is | 30364 | is |
| 30379 | 30365 | ||
| 30380 | @smallexample | 30366 | @smallexample |
| @@ -30389,12 +30375,12 @@ The derivative of | |||
| 30389 | @noindent | 30375 | @noindent |
| 30390 | with the second copy of the formula enabled in Embedded mode. | 30376 | with the second copy of the formula enabled in Embedded mode. |
| 30391 | You can now press @kbd{a d x @key{RET}} to take the derivative, and | 30377 | You can now press @kbd{a d x @key{RET}} to take the derivative, and |
| 30392 | @kbd{M-# d M-# d} to make two more copies of the derivative. | 30378 | @kbd{C-x * d C-x * d} to make two more copies of the derivative. |
| 30393 | To complete the computations, type @kbd{3 s l x @key{RET}} to evaluate | 30379 | To complete the computations, type @kbd{3 s l x @key{RET}} to evaluate |
| 30394 | the last formula, then move up to the second-to-last formula | 30380 | the last formula, then move up to the second-to-last formula |
| 30395 | and type @kbd{2 s l x @key{RET}}. | 30381 | and type @kbd{2 s l x @key{RET}}. |
| 30396 | 30382 | ||
| 30397 | Finally, you would want to press @kbd{M-# e} to exit Embedded | 30383 | Finally, you would want to press @kbd{C-x * e} to exit Embedded |
| 30398 | mode, then go up and insert the necessary text in between the | 30384 | mode, then go up and insert the necessary text in between the |
| 30399 | various formulas and numbers. | 30385 | various formulas and numbers. |
| 30400 | 30386 | ||
| @@ -30402,40 +30388,37 @@ various formulas and numbers. | |||
| 30402 | \bigskip | 30388 | \bigskip |
| 30403 | @end tex | 30389 | @end tex |
| 30404 | 30390 | ||
| 30405 | @kindex M-# f | 30391 | @kindex C-x * f |
| 30406 | @kindex M-# ' | 30392 | @kindex C-x * ' |
| 30407 | @pindex calc-embedded-new-formula | 30393 | @pindex calc-embedded-new-formula |
| 30408 | The @kbd{M-# f} (@code{calc-embedded-new-formula}) command | 30394 | The @kbd{C-x * f} (@code{calc-embedded-new-formula}) command |
| 30409 | creates a new embedded formula at the current point. It inserts | 30395 | creates a new embedded formula at the current point. It inserts |
| 30410 | some default delimiters, which are usually just blank lines, | 30396 | some default delimiters, which are usually just blank lines, |
| 30411 | and then does an algebraic entry to get the formula (which is | 30397 | and then does an algebraic entry to get the formula (which is |
| 30412 | then enabled for Embedded mode). This is just shorthand for | 30398 | then enabled for Embedded mode). This is just shorthand for |
| 30413 | typing the delimiters yourself, positioning the cursor between | 30399 | typing the delimiters yourself, positioning the cursor between |
| 30414 | the new delimiters, and pressing @kbd{M-# e}. The key sequence | 30400 | the new delimiters, and pressing @kbd{C-x * e}. The key sequence |
| 30415 | @kbd{M-# '} is equivalent to @kbd{M-# f}. | 30401 | @kbd{C-x * '} is equivalent to @kbd{C-x * f}. |
| 30416 | 30402 | ||
| 30417 | @kindex M-# n | 30403 | @kindex C-x * n |
| 30418 | @kindex M-# p | 30404 | @kindex C-x * p |
| 30419 | @pindex calc-embedded-next | 30405 | @pindex calc-embedded-next |
| 30420 | @pindex calc-embedded-previous | 30406 | @pindex calc-embedded-previous |
| 30421 | The @kbd{M-# n} (@code{calc-embedded-next}) and @kbd{M-# p} | 30407 | The @kbd{C-x * n} (@code{calc-embedded-next}) and @kbd{C-x * p} |
| 30422 | (@code{calc-embedded-previous}) commands move the cursor to the | 30408 | (@code{calc-embedded-previous}) commands move the cursor to the |
| 30423 | next or previous active embedded formula in the buffer. They | 30409 | next or previous active embedded formula in the buffer. They |
| 30424 | can take positive or negative prefix arguments to move by several | 30410 | can take positive or negative prefix arguments to move by several |
| 30425 | formulas. Note that these commands do not actually examine the | 30411 | formulas. Note that these commands do not actually examine the |
| 30426 | text of the buffer looking for formulas; they only see formulas | 30412 | text of the buffer looking for formulas; they only see formulas |
| 30427 | which have previously been activated in Embedded mode. In fact, | 30413 | which have previously been activated in Embedded mode. In fact, |
| 30428 | @kbd{M-# n} and @kbd{M-# p} are a useful way to tell which | 30414 | @kbd{C-x * n} and @kbd{C-x * p} are a useful way to tell which |
| 30429 | embedded formulas are currently active. Also, note that these | 30415 | embedded formulas are currently active. Also, note that these |
| 30430 | commands do not enable Embedded mode on the next or previous | 30416 | commands do not enable Embedded mode on the next or previous |
| 30431 | formula, they just move the cursor. (By the way, @kbd{M-# n} is | 30417 | formula, they just move the cursor. |
| 30432 | not as awkward to type as it may seem, because @kbd{M-#} ignores | ||
| 30433 | Shift and Meta on the second keystroke: @kbd{M-# M-N} can be typed | ||
| 30434 | by holding down Shift and Meta and alternately typing two keys.) | ||
| 30435 | 30418 | ||
| 30436 | @kindex M-# ` | 30419 | @kindex C-x * ` |
| 30437 | @pindex calc-embedded-edit | 30420 | @pindex calc-embedded-edit |
| 30438 | The @kbd{M-# `} (@code{calc-embedded-edit}) command edits the | 30421 | The @kbd{C-x * `} (@code{calc-embedded-edit}) command edits the |
| 30439 | embedded formula at the current point as if by @kbd{`} (@code{calc-edit}). | 30422 | embedded formula at the current point as if by @kbd{`} (@code{calc-edit}). |
| 30440 | Embedded mode does not have to be enabled for this to work. Press | 30423 | Embedded mode does not have to be enabled for this to work. Press |
| 30441 | @kbd{C-c C-c} to finish the edit, or @kbd{C-x k} to cancel. | 30424 | @kbd{C-c C-c} to finish the edit, or @kbd{C-x k} to cancel. |
| @@ -30500,10 +30483,10 @@ will do the trick) to select the righthand side of the assignment. | |||
| 30500 | Then, @kbd{17 @key{TAB} @key{DEL}} will swap the 17 into place (@pxref{Selecting | 30483 | Then, @kbd{17 @key{TAB} @key{DEL}} will swap the 17 into place (@pxref{Selecting |
| 30501 | Subformulas}, to see how this works). | 30484 | Subformulas}, to see how this works). |
| 30502 | 30485 | ||
| 30503 | @kindex M-# j | 30486 | @kindex C-x * j |
| 30504 | @pindex calc-embedded-select | 30487 | @pindex calc-embedded-select |
| 30505 | The @kbd{M-# j} (@code{calc-embedded-select}) command provides an | 30488 | The @kbd{C-x * j} (@code{calc-embedded-select}) command provides an |
| 30506 | easy way to operate on assignments. It is just like @kbd{M-# e}, | 30489 | easy way to operate on assignments. It is just like @kbd{C-x * e}, |
| 30507 | except that if the enabled formula is an assignment, it uses | 30490 | except that if the enabled formula is an assignment, it uses |
| 30508 | @kbd{j 2} to select the righthand side. If the enabled formula | 30491 | @kbd{j 2} to select the righthand side. If the enabled formula |
| 30509 | is an evaluates-to, it uses @kbd{j 1} to select the lefthand side. | 30492 | is an evaluates-to, it uses @kbd{j 1} to select the lefthand side. |
| @@ -30514,20 +30497,18 @@ bar := foo + 3 => 20 | |||
| 30514 | @end example | 30497 | @end example |
| 30515 | 30498 | ||
| 30516 | @noindent | 30499 | @noindent |
| 30517 | in which case @kbd{M-# j} will select the middle part (@samp{foo + 3}). | 30500 | in which case @kbd{C-x * j} will select the middle part (@samp{foo + 3}). |
| 30518 | 30501 | ||
| 30519 | The formula is automatically deselected when you leave Embedded | 30502 | The formula is automatically deselected when you leave Embedded |
| 30520 | mode. | 30503 | mode. |
| 30521 | 30504 | ||
| 30522 | @kindex M-# u | 30505 | @kindex C-x * u |
| 30523 | @kindex M-# = | ||
| 30524 | @pindex calc-embedded-update-formula | 30506 | @pindex calc-embedded-update-formula |
| 30525 | Another way to change the assignment to @code{foo} would simply be | 30507 | Another way to change the assignment to @code{foo} would simply be |
| 30526 | to edit the number using regular Emacs editing rather than Embedded | 30508 | to edit the number using regular Emacs editing rather than Embedded |
| 30527 | mode. Then, we have to find a way to get Embedded mode to notice | 30509 | mode. Then, we have to find a way to get Embedded mode to notice |
| 30528 | the change. The @kbd{M-# u} or @kbd{M-# =} | 30510 | the change. The @kbd{C-x * u} (@code{calc-embedded-update-formula}) |
| 30529 | (@code{calc-embedded-update-formula}) command is a convenient way | 30511 | command is a convenient way to do this. |
| 30530 | to do this. | ||
| 30531 | 30512 | ||
| 30532 | @example | 30513 | @example |
| 30533 | foo := 6 | 30514 | foo := 6 |
| @@ -30535,29 +30516,29 @@ foo := 6 | |||
| 30535 | foo + 7 => 13 | 30516 | foo + 7 => 13 |
| 30536 | @end example | 30517 | @end example |
| 30537 | 30518 | ||
| 30538 | Pressing @kbd{M-# u} is much like pressing @kbd{M-# e = M-# e}, that | 30519 | Pressing @kbd{C-x * u} is much like pressing @kbd{C-x * e = C-x * e}, that |
| 30539 | is, temporarily enabling Embedded mode for the formula under the | 30520 | is, temporarily enabling Embedded mode for the formula under the |
| 30540 | cursor and then evaluating it with @kbd{=}. But @kbd{M-# u} does | 30521 | cursor and then evaluating it with @kbd{=}. But @kbd{C-x * u} does |
| 30541 | not actually use @kbd{M-# e}, and in fact another formula somewhere | 30522 | not actually use @kbd{C-x * e}, and in fact another formula somewhere |
| 30542 | else can be enabled in Embedded mode while you use @kbd{M-# u} and | 30523 | else can be enabled in Embedded mode while you use @kbd{C-x * u} and |
| 30543 | that formula will not be disturbed. | 30524 | that formula will not be disturbed. |
| 30544 | 30525 | ||
| 30545 | With a numeric prefix argument, @kbd{M-# u} updates all active | 30526 | With a numeric prefix argument, @kbd{C-x * u} updates all active |
| 30546 | @samp{=>} formulas in the buffer. Formulas which have not yet | 30527 | @samp{=>} formulas in the buffer. Formulas which have not yet |
| 30547 | been activated in Embedded mode, and formulas which do not have | 30528 | been activated in Embedded mode, and formulas which do not have |
| 30548 | @samp{=>} as their top-level operator, are not affected by this. | 30529 | @samp{=>} as their top-level operator, are not affected by this. |
| 30549 | (This is useful only if you have used @kbd{m C}; see below.) | 30530 | (This is useful only if you have used @kbd{m C}; see below.) |
| 30550 | 30531 | ||
| 30551 | With a plain @kbd{C-u} prefix, @kbd{C-u M-# u} updates only in the | 30532 | With a plain @kbd{C-u} prefix, @kbd{C-u C-x * u} updates only in the |
| 30552 | region between mark and point rather than in the whole buffer. | 30533 | region between mark and point rather than in the whole buffer. |
| 30553 | 30534 | ||
| 30554 | @kbd{M-# u} is also a handy way to activate a formula, such as an | 30535 | @kbd{C-x * u} is also a handy way to activate a formula, such as an |
| 30555 | @samp{=>} formula that has freshly been typed in or loaded from a | 30536 | @samp{=>} formula that has freshly been typed in or loaded from a |
| 30556 | file. | 30537 | file. |
| 30557 | 30538 | ||
| 30558 | @kindex M-# a | 30539 | @kindex C-x * a |
| 30559 | @pindex calc-embedded-activate | 30540 | @pindex calc-embedded-activate |
| 30560 | The @kbd{M-# a} (@code{calc-embedded-activate}) command scans | 30541 | The @kbd{C-x * a} (@code{calc-embedded-activate}) command scans |
| 30561 | through the current buffer and activates all embedded formulas | 30542 | through the current buffer and activates all embedded formulas |
| 30562 | that contain @samp{:=} or @samp{=>} symbols. This does not mean | 30543 | that contain @samp{:=} or @samp{=>} symbols. This does not mean |
| 30563 | that Embedded mode is actually turned on, but only that the | 30544 | that Embedded mode is actually turned on, but only that the |
| @@ -30565,7 +30546,7 @@ formulas' positions are registered with Embedded mode so that | |||
| 30565 | the @samp{=>} values can be properly updated as assignments are | 30546 | the @samp{=>} values can be properly updated as assignments are |
| 30566 | changed. | 30547 | changed. |
| 30567 | 30548 | ||
| 30568 | It is a good idea to type @kbd{M-# a} right after loading a file | 30549 | It is a good idea to type @kbd{C-x * a} right after loading a file |
| 30569 | that uses embedded @samp{=>} operators. Emacs includes a nifty | 30550 | that uses embedded @samp{=>} operators. Emacs includes a nifty |
| 30570 | ``buffer-local variables'' feature that you can use to do this | 30551 | ``buffer-local variables'' feature that you can use to do this |
| 30571 | automatically. The idea is to place near the end of your file | 30552 | automatically. The idea is to place near the end of your file |
| @@ -30588,41 +30569,41 @@ trailing strings. | |||
| 30588 | When Emacs loads a file into memory, it checks for a Local Variables | 30569 | When Emacs loads a file into memory, it checks for a Local Variables |
| 30589 | section like this one at the end of the file. If it finds this | 30570 | section like this one at the end of the file. If it finds this |
| 30590 | section, it does the specified things (in this case, running | 30571 | section, it does the specified things (in this case, running |
| 30591 | @kbd{M-# a} automatically) before editing of the file begins. | 30572 | @kbd{C-x * a} automatically) before editing of the file begins. |
| 30592 | The Local Variables section must be within 3000 characters of the | 30573 | The Local Variables section must be within 3000 characters of the |
| 30593 | end of the file for Emacs to find it, and it must be in the last | 30574 | end of the file for Emacs to find it, and it must be in the last |
| 30594 | page of the file if the file has any page separators. | 30575 | page of the file if the file has any page separators. |
| 30595 | @xref{File Variables, , Local Variables in Files, emacs, the | 30576 | @xref{File Variables, , Local Variables in Files, emacs, the |
| 30596 | Emacs manual}. | 30577 | Emacs manual}. |
| 30597 | 30578 | ||
| 30598 | Note that @kbd{M-# a} does not update the formulas it finds. | 30579 | Note that @kbd{C-x * a} does not update the formulas it finds. |
| 30599 | To do this, type, say, @kbd{M-1 M-# u} after @w{@kbd{M-# a}}. | 30580 | To do this, type, say, @kbd{M-1 C-x * u} after @w{@kbd{C-x * a}}. |
| 30600 | Generally this should not be a problem, though, because the | 30581 | Generally this should not be a problem, though, because the |
| 30601 | formulas will have been up-to-date already when the file was | 30582 | formulas will have been up-to-date already when the file was |
| 30602 | saved. | 30583 | saved. |
| 30603 | 30584 | ||
| 30604 | Normally, @kbd{M-# a} activates all the formulas it finds, but | 30585 | Normally, @kbd{C-x * a} activates all the formulas it finds, but |
| 30605 | any previous active formulas remain active as well. With a | 30586 | any previous active formulas remain active as well. With a |
| 30606 | positive numeric prefix argument, @kbd{M-# a} first deactivates | 30587 | positive numeric prefix argument, @kbd{C-x * a} first deactivates |
| 30607 | all current active formulas, then actives the ones it finds in | 30588 | all current active formulas, then actives the ones it finds in |
| 30608 | its scan of the buffer. With a negative prefix argument, | 30589 | its scan of the buffer. With a negative prefix argument, |
| 30609 | @kbd{M-# a} simply deactivates all formulas. | 30590 | @kbd{C-x * a} simply deactivates all formulas. |
| 30610 | 30591 | ||
| 30611 | Embedded mode has two symbols, @samp{Active} and @samp{~Active}, | 30592 | Embedded mode has two symbols, @samp{Active} and @samp{~Active}, |
| 30612 | which it puts next to the major mode name in a buffer's mode line. | 30593 | which it puts next to the major mode name in a buffer's mode line. |
| 30613 | It puts @samp{Active} if it has reason to believe that all | 30594 | It puts @samp{Active} if it has reason to believe that all |
| 30614 | formulas in the buffer are active, because you have typed @kbd{M-# a} | 30595 | formulas in the buffer are active, because you have typed @kbd{C-x * a} |
| 30615 | and Calc has not since had to deactivate any formulas (which can | 30596 | and Calc has not since had to deactivate any formulas (which can |
| 30616 | happen if Calc goes to update an @samp{=>} formula somewhere because | 30597 | happen if Calc goes to update an @samp{=>} formula somewhere because |
| 30617 | a variable changed, and finds that the formula is no longer there | 30598 | a variable changed, and finds that the formula is no longer there |
| 30618 | due to some kind of editing outside of Embedded mode). Calc puts | 30599 | due to some kind of editing outside of Embedded mode). Calc puts |
| 30619 | @samp{~Active} in the mode line if some, but probably not all, | 30600 | @samp{~Active} in the mode line if some, but probably not all, |
| 30620 | formulas in the buffer are active. This happens if you activate | 30601 | formulas in the buffer are active. This happens if you activate |
| 30621 | a few formulas one at a time but never use @kbd{M-# a}, or if you | 30602 | a few formulas one at a time but never use @kbd{C-x * a}, or if you |
| 30622 | used @kbd{M-# a} but then Calc had to deactivate a formula | 30603 | used @kbd{C-x * a} but then Calc had to deactivate a formula |
| 30623 | because it lost track of it. If neither of these symbols appears | 30604 | because it lost track of it. If neither of these symbols appears |
| 30624 | in the mode line, no embedded formulas are active in the buffer | 30605 | in the mode line, no embedded formulas are active in the buffer |
| 30625 | (e.g., before Embedded mode has been used, or after a @kbd{M-- M-# a}). | 30606 | (e.g., before Embedded mode has been used, or after a @kbd{M-- C-x * a}). |
| 30626 | 30607 | ||
| 30627 | Embedded formulas can refer to assignments both before and after them | 30608 | Embedded formulas can refer to assignments both before and after them |
| 30628 | in the buffer. If there are several assignments to a variable, the | 30609 | in the buffer. If there are several assignments to a variable, the |
| @@ -30658,15 +30639,15 @@ and loaded in a later Emacs session, unless you have used the | |||
| 30658 | 30639 | ||
| 30659 | The @kbd{m C} (@code{calc-auto-recompute}) command turns automatic | 30640 | The @kbd{m C} (@code{calc-auto-recompute}) command turns automatic |
| 30660 | recomputation of @samp{=>} forms on and off. If you turn automatic | 30641 | recomputation of @samp{=>} forms on and off. If you turn automatic |
| 30661 | recomputation off, you will have to use @kbd{M-# u} to update these | 30642 | recomputation off, you will have to use @kbd{C-x * u} to update these |
| 30662 | formulas manually after an assignment has been changed. If you | 30643 | formulas manually after an assignment has been changed. If you |
| 30663 | plan to change several assignments at once, it may be more efficient | 30644 | plan to change several assignments at once, it may be more efficient |
| 30664 | to type @kbd{m C}, change all the assignments, then use @kbd{M-1 M-# u} | 30645 | to type @kbd{m C}, change all the assignments, then use @kbd{M-1 C-x * u} |
| 30665 | to update the entire buffer afterwards. The @kbd{m C} command also | 30646 | to update the entire buffer afterwards. The @kbd{m C} command also |
| 30666 | controls @samp{=>} formulas on the stack; @pxref{Evaluates-To | 30647 | controls @samp{=>} formulas on the stack; @pxref{Evaluates-To |
| 30667 | Operator}. When you turn automatic recomputation back on, the | 30648 | Operator}. When you turn automatic recomputation back on, the |
| 30668 | stack will be updated but the Embedded buffer will not; you must | 30649 | stack will be updated but the Embedded buffer will not; you must |
| 30669 | use @kbd{M-# u} to update the buffer by hand. | 30650 | use @kbd{C-x * u} to update the buffer by hand. |
| 30670 | 30651 | ||
| 30671 | @node Mode Settings in Embedded Mode, Customizing Embedded Mode, Assignments in Embedded Mode, Embedded Mode | 30652 | @node Mode Settings in Embedded Mode, Customizing Embedded Mode, Assignments in Embedded Mode, Embedded Mode |
| 30672 | @section Mode Settings in Embedded Mode | 30653 | @section Mode Settings in Embedded Mode |
| @@ -30777,11 +30758,11 @@ mode annotations somewhere out of the way, say, on a new page of | |||
| 30777 | the file, as long as those mode settings are suitable for all | 30758 | the file, as long as those mode settings are suitable for all |
| 30778 | formulas in the file. | 30759 | formulas in the file. |
| 30779 | 30760 | ||
| 30780 | Enabling a formula with @kbd{M-# e} causes a fresh scan for local | 30761 | Enabling a formula with @kbd{C-x * e} causes a fresh scan for local |
| 30781 | mode annotations; you will have to use this after adding annotations | 30762 | mode annotations; you will have to use this after adding annotations |
| 30782 | above a formula by hand to get the formula to notice them. Updating | 30763 | above a formula by hand to get the formula to notice them. Updating |
| 30783 | a formula with @kbd{M-# u} will also re-scan the local modes, but | 30764 | a formula with @kbd{C-x * u} will also re-scan the local modes, but |
| 30784 | global modes are only re-scanned by @kbd{M-# a}. | 30765 | global modes are only re-scanned by @kbd{C-x * a}. |
| 30785 | 30766 | ||
| 30786 | Another way that modes can get out of date is if you add a local | 30767 | Another way that modes can get out of date is if you add a local |
| 30787 | mode annotation to a formula that has another formula after it. | 30768 | mode annotation to a formula that has another formula after it. |
| @@ -30797,7 +30778,7 @@ rules of reading annotations the @samp{(sci 0)} applies to it, too. | |||
| 30797 | 456. | 30778 | 456. |
| 30798 | @end example | 30779 | @end example |
| 30799 | 30780 | ||
| 30800 | We would have to go down to the other formula and press @kbd{M-# u} | 30781 | We would have to go down to the other formula and press @kbd{C-x * u} |
| 30801 | on it in order to get it to notice the new annotation. | 30782 | on it in order to get it to notice the new annotation. |
| 30802 | 30783 | ||
| 30803 | Two more mode-recording modes selectable by @kbd{m R} are available | 30784 | Two more mode-recording modes selectable by @kbd{m R} are available |
| @@ -30819,13 +30800,13 @@ for @code{Save} have no effect. | |||
| 30819 | @noindent | 30800 | @noindent |
| 30820 | You can modify Embedded mode's behavior by setting various Lisp | 30801 | You can modify Embedded mode's behavior by setting various Lisp |
| 30821 | variables described here. These variables are customizable | 30802 | variables described here. These variables are customizable |
| 30822 | (@pxref{Customizable Variables}), or you can use @kbd{M-x set-variable} | 30803 | (@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable} |
| 30823 | or @kbd{M-x edit-options} to adjust a variable on the fly. | 30804 | or @kbd{M-x edit-options} to adjust a variable on the fly. |
| 30824 | (Another possibility would be to use a file-local variable annotation at | 30805 | (Another possibility would be to use a file-local variable annotation at |
| 30825 | the end of the file; | 30806 | the end of the file; |
| 30826 | @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) | 30807 | @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) |
| 30827 | Many of the variables given mentioned here can be set to depend on the | 30808 | Many of the variables given mentioned here can be set to depend on the |
| 30828 | major mode of the editing buffer (@pxref{Customizable Variables}). | 30809 | major mode of the editing buffer (@pxref{Customizing Calc}). |
| 30829 | 30810 | ||
| 30830 | @vindex calc-embedded-open-formula | 30811 | @vindex calc-embedded-open-formula |
| 30831 | The @code{calc-embedded-open-formula} variable holds a regular | 30812 | The @code{calc-embedded-open-formula} variable holds a regular |
| @@ -30899,8 +30880,8 @@ case). | |||
| 30899 | @vindex calc-embedded-open-word | 30880 | @vindex calc-embedded-open-word |
| 30900 | @vindex calc-embedded-close-word | 30881 | @vindex calc-embedded-close-word |
| 30901 | The @code{calc-embedded-open-word} and @code{calc-embedded-close-word} | 30882 | The @code{calc-embedded-open-word} and @code{calc-embedded-close-word} |
| 30902 | variables are similar expressions used when you type @kbd{M-# w} | 30883 | variables are similar expressions used when you type @kbd{C-x * w} |
| 30903 | instead of @kbd{M-# e} to enable Embedded mode. | 30884 | instead of @kbd{C-x * e} to enable Embedded mode. |
| 30904 | 30885 | ||
| 30905 | @vindex calc-embedded-open-plain | 30886 | @vindex calc-embedded-open-plain |
| 30906 | The @code{calc-embedded-open-plain} variable is a string which | 30887 | The @code{calc-embedded-open-plain} variable is a string which |
| @@ -30921,9 +30902,9 @@ that followed might be shifted over with respect to the other lines. | |||
| 30921 | @vindex calc-embedded-open-new-formula | 30902 | @vindex calc-embedded-open-new-formula |
| 30922 | The @code{calc-embedded-open-new-formula} variable is a string | 30903 | The @code{calc-embedded-open-new-formula} variable is a string |
| 30923 | which is inserted at the front of a new formula when you type | 30904 | which is inserted at the front of a new formula when you type |
| 30924 | @kbd{M-# f}. Its default value is @code{"\n\n"}. If this | 30905 | @kbd{C-x * f}. Its default value is @code{"\n\n"}. If this |
| 30925 | string begins with a newline character and the @kbd{M-# f} is | 30906 | string begins with a newline character and the @kbd{C-x * f} is |
| 30926 | typed at the beginning of a line, @kbd{M-# f} will skip this | 30907 | typed at the beginning of a line, @kbd{C-x * f} will skip this |
| 30927 | first newline to avoid introducing unnecessary blank lines in | 30908 | first newline to avoid introducing unnecessary blank lines in |
| 30928 | the file. | 30909 | the file. |
| 30929 | 30910 | ||
| @@ -30931,15 +30912,15 @@ the file. | |||
| 30931 | The @code{calc-embedded-close-new-formula} variable is the corresponding | 30912 | The @code{calc-embedded-close-new-formula} variable is the corresponding |
| 30932 | string which is inserted at the end of a new formula. Its default | 30913 | string which is inserted at the end of a new formula. Its default |
| 30933 | value is also @code{"\n\n"}. The final newline is omitted by | 30914 | value is also @code{"\n\n"}. The final newline is omitted by |
| 30934 | @w{@kbd{M-# f}} if typed at the end of a line. (It follows that if | 30915 | @w{@kbd{C-x * f}} if typed at the end of a line. (It follows that if |
| 30935 | @kbd{M-# f} is typed on a blank line, both a leading opening | 30916 | @kbd{C-x * f} is typed on a blank line, both a leading opening |
| 30936 | newline and a trailing closing newline are omitted.) | 30917 | newline and a trailing closing newline are omitted.) |
| 30937 | 30918 | ||
| 30938 | @vindex calc-embedded-announce-formula | 30919 | @vindex calc-embedded-announce-formula |
| 30939 | The @code{calc-embedded-announce-formula} variable is a regular | 30920 | The @code{calc-embedded-announce-formula} variable is a regular |
| 30940 | expression which is sure to be followed by an embedded formula. | 30921 | expression which is sure to be followed by an embedded formula. |
| 30941 | The @kbd{M-# a} command searches for this pattern as well as for | 30922 | The @kbd{C-x * a} command searches for this pattern as well as for |
| 30942 | @samp{=>} and @samp{:=} operators. Note that @kbd{M-# a} will | 30923 | @samp{=>} and @samp{:=} operators. Note that @kbd{C-x * a} will |
| 30943 | not activate just anything surrounded by formula delimiters; after | 30924 | not activate just anything surrounded by formula delimiters; after |
| 30944 | all, blank lines are considered formula delimiters by default! | 30925 | all, blank lines are considered formula delimiters by default! |
| 30945 | But if your language includes a delimiter which can only occur | 30926 | But if your language includes a delimiter which can only occur |
| @@ -30967,7 +30948,7 @@ is simply a newline, @code{"\n"}, but may be different for different | |||
| 30967 | major modes. If you change this, it is a good idea still to end with a | 30948 | major modes. If you change this, it is a good idea still to end with a |
| 30968 | newline so that mode annotations will appear on lines by themselves. | 30949 | newline so that mode annotations will appear on lines by themselves. |
| 30969 | 30950 | ||
| 30970 | @node Programming, Customizable Variables, Embedded Mode, Top | 30951 | @node Programming, Customizing Calc, Embedded Mode, Top |
| 30971 | @chapter Programming | 30952 | @chapter Programming |
| 30972 | 30953 | ||
| 30973 | @noindent | 30954 | @noindent |
| @@ -31179,9 +31160,9 @@ takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, | |||
| 31179 | we take it for granted that it is clear we really mean | 31160 | we take it for granted that it is clear we really mean |
| 31180 | @kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. | 31161 | @kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. |
| 31181 | 31162 | ||
| 31182 | @kindex M-# m | 31163 | @kindex C-x * m |
| 31183 | @pindex read-kbd-macro | 31164 | @pindex read-kbd-macro |
| 31184 | The @kbd{M-# m} (@code{read-kbd-macro}) command reads an Emacs ``region'' | 31165 | The @kbd{C-x * m} (@code{read-kbd-macro}) command reads an Emacs ``region'' |
| 31185 | of spelled-out keystrokes and defines it as the current keyboard macro. | 31166 | of spelled-out keystrokes and defines it as the current keyboard macro. |
| 31186 | It is a convenient way to define a keyboard macro that has been stored | 31167 | It is a convenient way to define a keyboard macro that has been stored |
| 31187 | in a file, or to define a macro without executing it at the same time. | 31168 | in a file, or to define a macro without executing it at the same time. |
| @@ -31289,7 +31270,7 @@ happened to be sitting on the stack before we typed the above definition! | |||
| 31289 | Another approach is to enter a harmless dummy definition for the macro, | 31270 | Another approach is to enter a harmless dummy definition for the macro, |
| 31290 | then go back and edit in the real one with a @kbd{Z E} command. Yet | 31271 | then go back and edit in the real one with a @kbd{Z E} command. Yet |
| 31291 | another approach is to type the macro as written-out keystroke names | 31272 | another approach is to type the macro as written-out keystroke names |
| 31292 | in a buffer, then use @kbd{M-# m} (@code{read-kbd-macro}) to read the | 31273 | in a buffer, then use @kbd{C-x * m} (@code{read-kbd-macro}) to read the |
| 31293 | macro. | 31274 | macro. |
| 31294 | 31275 | ||
| 31295 | @kindex Z / | 31276 | @kindex Z / |
| @@ -31463,29 +31444,29 @@ return control to the keyboard macro. | |||
| 31463 | @node Invocation Macros, Algebraic Definitions, Keyboard Macros, Programming | 31444 | @node Invocation Macros, Algebraic Definitions, Keyboard Macros, Programming |
| 31464 | @section Invocation Macros | 31445 | @section Invocation Macros |
| 31465 | 31446 | ||
| 31466 | @kindex M-# z | 31447 | @kindex C-x * z |
| 31467 | @kindex Z I | 31448 | @kindex Z I |
| 31468 | @pindex calc-user-invocation | 31449 | @pindex calc-user-invocation |
| 31469 | @pindex calc-user-define-invocation | 31450 | @pindex calc-user-define-invocation |
| 31470 | Calc provides one special keyboard macro, called up by @kbd{M-# z} | 31451 | Calc provides one special keyboard macro, called up by @kbd{C-x * z} |
| 31471 | (@code{calc-user-invocation}), that is intended to allow you to define | 31452 | (@code{calc-user-invocation}), that is intended to allow you to define |
| 31472 | your own special way of starting Calc. To define this ``invocation | 31453 | your own special way of starting Calc. To define this ``invocation |
| 31473 | macro,'' create the macro in the usual way with @kbd{C-x (} and | 31454 | macro,'' create the macro in the usual way with @kbd{C-x (} and |
| 31474 | @kbd{C-x )}, then type @kbd{Z I} (@code{calc-user-define-invocation}). | 31455 | @kbd{C-x )}, then type @kbd{Z I} (@code{calc-user-define-invocation}). |
| 31475 | There is only one invocation macro, so you don't need to type any | 31456 | There is only one invocation macro, so you don't need to type any |
| 31476 | additional letters after @kbd{Z I}. From now on, you can type | 31457 | additional letters after @kbd{Z I}. From now on, you can type |
| 31477 | @kbd{M-# z} at any time to execute your invocation macro. | 31458 | @kbd{C-x * z} at any time to execute your invocation macro. |
| 31478 | 31459 | ||
| 31479 | For example, suppose you find yourself often grabbing rectangles of | 31460 | For example, suppose you find yourself often grabbing rectangles of |
| 31480 | numbers into Calc and multiplying their columns. You can do this | 31461 | numbers into Calc and multiplying their columns. You can do this |
| 31481 | by typing @kbd{M-# r} to grab, and @kbd{V R : *} to multiply columns. | 31462 | by typing @kbd{C-x * r} to grab, and @kbd{V R : *} to multiply columns. |
| 31482 | To make this into an invocation macro, just type @kbd{C-x ( M-# r | 31463 | To make this into an invocation macro, just type @kbd{C-x ( C-x * r |
| 31483 | V R : * C-x )}, then @kbd{Z I}. Then, to multiply a rectangle of data, | 31464 | V R : * C-x )}, then @kbd{Z I}. Then, to multiply a rectangle of data, |
| 31484 | just mark the data in its buffer in the usual way and type @kbd{M-# z}. | 31465 | just mark the data in its buffer in the usual way and type @kbd{C-x * z}. |
| 31485 | 31466 | ||
| 31486 | Invocation macros are treated like regular Emacs keyboard macros; | 31467 | Invocation macros are treated like regular Emacs keyboard macros; |
| 31487 | all the special features described above for @kbd{Z K}-style macros | 31468 | all the special features described above for @kbd{Z K}-style macros |
| 31488 | do not apply. @kbd{M-# z} is just like @kbd{C-x e}, except that it | 31469 | do not apply. @kbd{C-x * z} is just like @kbd{C-x e}, except that it |
| 31489 | uses the macro that was last stored by @kbd{Z I}. (In fact, the | 31470 | uses the macro that was last stored by @kbd{Z I}. (In fact, the |
| 31490 | macro does not even have to have anything to do with Calc!) | 31471 | macro does not even have to have anything to do with Calc!) |
| 31491 | 31472 | ||
| @@ -34729,7 +34710,7 @@ per Emacs session. | |||
| 34729 | 34710 | ||
| 34730 | @defvar calc-end-hook | 34711 | @defvar calc-end-hook |
| 34731 | This hook is called by @code{calc-quit}, generally because the user | 34712 | This hook is called by @code{calc-quit}, generally because the user |
| 34732 | presses @kbd{q} or @kbd{M-# c} while in Calc. The Calc buffer will | 34713 | presses @kbd{q} or @kbd{C-x * c} while in Calc. The Calc buffer will |
| 34733 | be the current buffer. The hook is called as the very first | 34714 | be the current buffer. The hook is called as the very first |
| 34734 | step, before the Calc window is destroyed. | 34715 | step, before the Calc window is destroyed. |
| 34735 | @end defvar | 34716 | @end defvar |
| @@ -34781,7 +34762,7 @@ message is inserted. | |||
| 34781 | @end defvar | 34762 | @end defvar |
| 34782 | 34763 | ||
| 34783 | @defvar calc-reset-hook | 34764 | @defvar calc-reset-hook |
| 34784 | This hook is called after @kbd{M-# 0} (@code{calc-reset}) has | 34765 | This hook is called after @kbd{C-x * 0} (@code{calc-reset}) has |
| 34785 | reset all modes. The Calc buffer will be the current buffer. | 34766 | reset all modes. The Calc buffer will be the current buffer. |
| 34786 | @end defvar | 34767 | @end defvar |
| 34787 | 34768 | ||
| @@ -34846,10 +34827,27 @@ used the first time, your hook should add a variable to the | |||
| 34846 | list and also call @code{make-local-variable} itself. | 34827 | list and also call @code{make-local-variable} itself. |
| 34847 | @end defvar | 34828 | @end defvar |
| 34848 | 34829 | ||
| 34849 | @node Customizable Variables, Reporting Bugs, Programming, Top | 34830 | @node Customizing Calc, Reporting Bugs, Programming, Top |
| 34850 | @appendix Customizable Variables | 34831 | @appendix Customizing Calc |
| 34832 | |||
| 34833 | The usual prefix for Calc is the key sequence @kbd{C-x *}. If you wish | ||
| 34834 | to use a different prefix, you can put | ||
| 34851 | 34835 | ||
| 34852 | GNU Calc is controlled by many variables, most of which can be reset | 34836 | @example |
| 34837 | (global-set-key "NEWPREFIX" 'calc-dispatch) | ||
| 34838 | @end example | ||
| 34839 | |||
| 34840 | @noindent | ||
| 34841 | in your .emacs file. | ||
| 34842 | (@xref{Key Bindings,,Customizing Key Bindings,emacs, | ||
| 34843 | The GNU Emacs Manual}, for more information on binding keys.) | ||
| 34844 | A convenient way to start Calc is with @kbd{C-x * *}; to make it equally | ||
| 34845 | convenient for users who use a different prefix, the prefix can be | ||
| 34846 | followed by @kbd{=}, @kbd{&}, @kbd{#}, @kbd{\}, @kbd{/}, @kbd{+} or | ||
| 34847 | @kbd{-} as well as @kbd{*} to start Calc, and so in many cases the last | ||
| 34848 | character of the prefix can simply be typed twice. | ||
| 34849 | |||
| 34850 | Calc is controlled by many variables, most of which can be reset | ||
| 34853 | from within Calc. Some variables are less involved with actual | 34851 | from within Calc. Some variables are less involved with actual |
| 34854 | calculation, and can be set outside of Calc using Emacs's | 34852 | calculation, and can be set outside of Calc using Emacs's |
| 34855 | customization facilities. These variables are listed below. | 34853 | customization facilities. These variables are listed below. |
| @@ -34882,7 +34880,7 @@ See @ref{Graphics}.@* | |||
| 34882 | The variable @code{calc-gnuplot-name} should be the name of the | 34880 | The variable @code{calc-gnuplot-name} should be the name of the |
| 34883 | GNUPLOT program (a string). If you have GNUPLOT installed on your | 34881 | GNUPLOT program (a string). If you have GNUPLOT installed on your |
| 34884 | system but Calc is unable to find it, you may need to set this | 34882 | system but Calc is unable to find it, you may need to set this |
| 34885 | variable. (@pxref{Customizable Variables}) | 34883 | variable. (@pxref{Customizing Calc}) |
| 34886 | You may also need to set some Lisp variables to show Calc how to run | 34884 | You may also need to set some Lisp variables to show Calc how to run |
| 34887 | GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} . The default value | 34885 | GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} . The default value |
| 34888 | of @code{calc-gnuplot-name} is @code{"gnuplot"}. | 34886 | of @code{calc-gnuplot-name} is @code{"gnuplot"}. |
| @@ -34936,9 +34934,9 @@ The default value of @code{calc-language-alist} is | |||
| 34936 | @defvarx calc-embedded-announce-formula-alist | 34934 | @defvarx calc-embedded-announce-formula-alist |
| 34937 | See @ref{Customizing Embedded Mode}.@* | 34935 | See @ref{Customizing Embedded Mode}.@* |
| 34938 | The variable @code{calc-embedded-announce-formula} helps determine | 34936 | The variable @code{calc-embedded-announce-formula} helps determine |
| 34939 | what formulas @kbd{M-# a} will activate in a buffer. It is a | 34937 | what formulas @kbd{C-x * a} will activate in a buffer. It is a |
| 34940 | regular expression, and when activating embedded formulas with | 34938 | regular expression, and when activating embedded formulas with |
| 34941 | @kbd{M-# a}, it will tell Calc that what follows is a formula to be | 34939 | @kbd{C-x * a}, it will tell Calc that what follows is a formula to be |
| 34942 | activated. (Calc also uses other patterns to find formulas, such as | 34940 | activated. (Calc also uses other patterns to find formulas, such as |
| 34943 | @samp{=>} and @samp{:=}.) | 34941 | @samp{=>} and @samp{:=}.) |
| 34944 | 34942 | ||
| @@ -34975,7 +34973,7 @@ and @code{calc-embedded-open-close-mode-alist}. | |||
| 34975 | See @ref{Customizing Embedded Mode}.@* | 34973 | See @ref{Customizing Embedded Mode}.@* |
| 34976 | The variables @code{calc-embedded-open-formula} and | 34974 | The variables @code{calc-embedded-open-formula} and |
| 34977 | @code{calc-embedded-open-formula} control the region that Calc will | 34975 | @code{calc-embedded-open-formula} control the region that Calc will |
| 34978 | activate as a formula when Embedded mode is entered with @kbd{M-# e}. | 34976 | activate as a formula when Embedded mode is entered with @kbd{C-x * e}. |
| 34979 | They are regular expressions; | 34977 | They are regular expressions; |
| 34980 | Calc normally scans backward and forward in the buffer for the | 34978 | Calc normally scans backward and forward in the buffer for the |
| 34981 | nearest text matching these regular expressions to be the ``formula | 34979 | nearest text matching these regular expressions to be the ``formula |
| @@ -35013,7 +35011,7 @@ It consists of a list of lists of the form | |||
| 35013 | See @ref{Customizing Embedded Mode}.@* | 35011 | See @ref{Customizing Embedded Mode}.@* |
| 35014 | The variables @code{calc-embedded-open-word} and | 35012 | The variables @code{calc-embedded-open-word} and |
| 35015 | @code{calc-embedded-close-word} control the region that Calc will | 35013 | @code{calc-embedded-close-word} control the region that Calc will |
| 35016 | activate when Embedded mode is entered with @kbd{M-# w}. They are | 35014 | activate when Embedded mode is entered with @kbd{C-x * w}. They are |
| 35017 | regular expressions. | 35015 | regular expressions. |
| 35018 | 35016 | ||
| 35019 | The default values of @code{calc-embedded-open-word} and | 35017 | The default values of @code{calc-embedded-open-word} and |
| @@ -35077,15 +35075,15 @@ and @code{calc-embedded-open-close-mode-alist}. | |||
| 35077 | See @ref{Customizing Embedded Mode}.@* | 35075 | See @ref{Customizing Embedded Mode}.@* |
| 35078 | The variables @code{calc-embedded-open-new-formula} and | 35076 | The variables @code{calc-embedded-open-new-formula} and |
| 35079 | @code{calc-embedded-close-new-formula} are strings which are | 35077 | @code{calc-embedded-close-new-formula} are strings which are |
| 35080 | inserted before and after a new formula when you type @kbd{M-# f}. | 35078 | inserted before and after a new formula when you type @kbd{C-x * f}. |
| 35081 | 35079 | ||
| 35082 | The default value of @code{calc-embedded-open-new-formula} is | 35080 | The default value of @code{calc-embedded-open-new-formula} is |
| 35083 | @code{"\n\n"}. If this string begins with a newline character and the | 35081 | @code{"\n\n"}. If this string begins with a newline character and the |
| 35084 | @kbd{M-# f} is typed at the beginning of a line, @kbd{M-# f} will skip | 35082 | @kbd{C-x * f} is typed at the beginning of a line, @kbd{C-x * f} will skip |
| 35085 | this first newline to avoid introducing unnecessary blank lines in the | 35083 | this first newline to avoid introducing unnecessary blank lines in the |
| 35086 | file. The default value of @code{calc-embedded-close-new-formula} is | 35084 | file. The default value of @code{calc-embedded-close-new-formula} is |
| 35087 | also @code{"\n\n"}. The final newline is omitted by @w{@kbd{M-# f}} | 35085 | also @code{"\n\n"}. The final newline is omitted by @w{@kbd{C-x * f}} |
| 35088 | if typed at the end of a line. (It follows that if @kbd{M-# f} is | 35086 | if typed at the end of a line. (It follows that if @kbd{C-x * f} is |
| 35089 | typed on a blank line, both a leading opening newline and a trailing | 35087 | typed on a blank line, both a leading opening newline and a trailing |
| 35090 | closing newline are omitted.) | 35088 | closing newline are omitted.) |
| 35091 | 35089 | ||
| @@ -35141,7 +35139,7 @@ should also be added to @code{calc-embedded-announce-formula-alist} | |||
| 35141 | and @code{calc-embedded-open-close-plain-alist}. | 35139 | and @code{calc-embedded-open-close-plain-alist}. |
| 35142 | @end defvar | 35140 | @end defvar |
| 35143 | 35141 | ||
| 35144 | @node Reporting Bugs, Summary, Customizable Variables, Top | 35142 | @node Reporting Bugs, Summary, Customizing Calc, Top |
| 35145 | @appendix Reporting Bugs | 35143 | @appendix Reporting Bugs |
| 35146 | 35144 | ||
| 35147 | @noindent | 35145 | @noindent |
| @@ -35225,35 +35223,34 @@ keystrokes are not listed in this summary. | |||
| 35225 | @advance@baselineskip-2.5pt | 35223 | @advance@baselineskip-2.5pt |
| 35226 | @let@c@sumbreak | 35224 | @let@c@sumbreak |
| 35227 | @end iftex | 35225 | @end iftex |
| 35228 | @r{ @: M-# a @: @: 33 @:calc-embedded-activate@:} | 35226 | @r{ @: C-x * a @: @: 33 @:calc-embedded-activate@:} |
| 35229 | @r{ @: M-# b @: @: @:calc-big-or-small@:} | 35227 | @r{ @: C-x * b @: @: @:calc-big-or-small@:} |
| 35230 | @r{ @: M-# c @: @: @:calc@:} | 35228 | @r{ @: C-x * c @: @: @:calc@:} |
| 35231 | @r{ @: M-# d @: @: @:calc-embedded-duplicate@:} | 35229 | @r{ @: C-x * d @: @: @:calc-embedded-duplicate@:} |
| 35232 | @r{ @: M-# e @: @: 34 @:calc-embedded@:} | 35230 | @r{ @: C-x * e @: @: 34 @:calc-embedded@:} |
| 35233 | @r{ @: M-# f @:formula @: @:calc-embedded-new-formula@:} | 35231 | @r{ @: C-x * f @:formula @: @:calc-embedded-new-formula@:} |
| 35234 | @r{ @: M-# g @: @: 35 @:calc-grab-region@:} | 35232 | @r{ @: C-x * g @: @: 35 @:calc-grab-region@:} |
| 35235 | @r{ @: M-# i @: @: @:calc-info@:} | 35233 | @r{ @: C-x * i @: @: @:calc-info@:} |
| 35236 | @r{ @: M-# j @: @: @:calc-embedded-select@:} | 35234 | @r{ @: C-x * j @: @: @:calc-embedded-select@:} |
| 35237 | @r{ @: M-# k @: @: @:calc-keypad@:} | 35235 | @r{ @: C-x * k @: @: @:calc-keypad@:} |
| 35238 | @r{ @: M-# l @: @: @:calc-load-everything@:} | 35236 | @r{ @: C-x * l @: @: @:calc-load-everything@:} |
| 35239 | @r{ @: M-# m @: @: @:read-kbd-macro@:} | 35237 | @r{ @: C-x * m @: @: @:read-kbd-macro@:} |
| 35240 | @r{ @: M-# n @: @: 4 @:calc-embedded-next@:} | 35238 | @r{ @: C-x * n @: @: 4 @:calc-embedded-next@:} |
| 35241 | @r{ @: M-# o @: @: @:calc-other-window@:} | 35239 | @r{ @: C-x * o @: @: @:calc-other-window@:} |
| 35242 | @r{ @: M-# p @: @: 4 @:calc-embedded-previous@:} | 35240 | @r{ @: C-x * p @: @: 4 @:calc-embedded-previous@:} |
| 35243 | @r{ @: M-# q @:formula @: @:quick-calc@:} | 35241 | @r{ @: C-x * q @:formula @: @:quick-calc@:} |
| 35244 | @r{ @: M-# r @: @: 36 @:calc-grab-rectangle@:} | 35242 | @r{ @: C-x * r @: @: 36 @:calc-grab-rectangle@:} |
| 35245 | @r{ @: M-# s @: @: @:calc-info-summary@:} | 35243 | @r{ @: C-x * s @: @: @:calc-info-summary@:} |
| 35246 | @r{ @: M-# t @: @: @:calc-tutorial@:} | 35244 | @r{ @: C-x * t @: @: @:calc-tutorial@:} |
| 35247 | @r{ @: M-# u @: @: @:calc-embedded-update-formula@:} | 35245 | @r{ @: C-x * u @: @: @:calc-embedded-update-formula@:} |
| 35248 | @r{ @: M-# w @: @: @:calc-embedded-word@:} | 35246 | @r{ @: C-x * w @: @: @:calc-embedded-word@:} |
| 35249 | @r{ @: M-# x @: @: @:calc-quit@:} | 35247 | @r{ @: C-x * x @: @: @:calc-quit@:} |
| 35250 | @r{ @: M-# y @: @:1,28,49 @:calc-copy-to-buffer@:} | 35248 | @r{ @: C-x * y @: @:1,28,49 @:calc-copy-to-buffer@:} |
| 35251 | @r{ @: M-# z @: @: @:calc-user-invocation@:} | 35249 | @r{ @: C-x * z @: @: @:calc-user-invocation@:} |
| 35252 | @r{ @: M-# = @: @: @:calc-embedded-update-formula@:} | 35250 | @r{ @: C-x * : @: @: 36 @:calc-grab-sum-down@:} |
| 35253 | @r{ @: M-# : @: @: 36 @:calc-grab-sum-down@:} | 35251 | @r{ @: C-x * _ @: @: 36 @:calc-grab-sum-across@:} |
| 35254 | @r{ @: M-# _ @: @: 36 @:calc-grab-sum-across@:} | 35252 | @r{ @: C-x * ` @:editing @: 30 @:calc-embedded-edit@:} |
| 35255 | @r{ @: M-# ` @:editing @: 30 @:calc-embedded-edit@:} | 35253 | @r{ @: C-x * 0 @:(zero) @: @:calc-reset@:} |
| 35256 | @r{ @: M-# 0 @:(zero) @: @:calc-reset@:} | ||
| 35257 | 35254 | ||
| 35258 | @c | 35255 | @c |
| 35259 | @r{ @: 0-9 @:number @: @:@:number} | 35256 | @r{ @: 0-9 @:number @: @:@:number} |