@cindex Continuous memory
@cindex Saving mode settings
@cindex Permanent mode settings
-@cindex @file{.emacs} file, mode settings
-You can save all of the current mode settings in your @file{.emacs} file
-with the @kbd{m m} (@code{calc-save-modes}) command. This will cause
-Emacs to reestablish these modes each time it starts up. The modes saved
-in the file include everything controlled by the @kbd{m} and @kbd{d}
-prefix keys, the current precision and binary word size, whether or not
-the trail is displayed, the current height of the Calc window, and more.
-The current interface (used when you type @kbd{M-# M-#}) is also saved.
-If there were already saved mode settings in the file, they are replaced.
-Otherwise, the new mode information is appended to the end of the file.
+@cindex Calc init file, mode settings
+You can save all of the current mode settings in your Calc init file
+(the file given by the variable @code{calc-settings-file}, typically
+@file{~/.calc.el}) with the @kbd{m m} (@code{calc-save-modes}) command.
+This will cause Emacs to reestablish these modes each time it starts up.
+The modes saved in the file include everything controlled by the @kbd{m}
+and @kbd{d} prefix keys, the current precision and binary word size,
+whether or not the trail is displayed, the current height of the Calc
+window, and more. The current interface (used when you type @kbd{M-#
+M-#}) is also saved. If there were already saved mode settings in the
+file, they are replaced. Otherwise, the new mode information is
+appended to the end of the file.
@kindex m R
@pindex calc-mode-record-mode
Selections show deep structure (@kbd{j b}; @pxref{Making Selections}).
@item Save
-Record modes in @file{~/.emacs} (@kbd{m R}; @pxref{General Mode Commands}).
+Record modes in @file{~/.calc.el} (@kbd{m R}; @pxref{General Mode Commands}).
@item Local
Record modes in Embedded buffer (@kbd{m R}).
@kindex u p
@pindex calc-permanent-units
-@cindex @file{.emacs} file, user-defined units
+@cindex Calc init file, user-defined units
The @kbd{u p} (@code{calc-permanent-units}) command stores the user-defined
-units in your @file{.emacs} file, so that the units will still be
-available in subsequent Emacs sessions. If there was already a set of
-user-defined units in your @file{.emacs} file, it is replaced by the
-new set. (@xref{General Mode Commands}, for a way to tell Calc to use
-a different file instead of @file{.emacs}.)
+units in your Calc init file (the file given by the variable
+@code{calc-settings-file}, typically @file{~/.calc.el}), so that the
+units will still be available in subsequent Emacs sessions. If there
+was already a set of user-defined units in your Calc init file, it
+is replaced by the new set. (@xref{General Mode Commands}, for a way to
+tell Calc to use a different file for the Calc init file.)
@node Store and Recall, Graphics, Units, Top
@chapter Storing and Recalling
@pindex calc-permanent-variable
@cindex Storing variables
@cindex Permanent variables
-@cindex @file{.emacs} file, variables
+@cindex Calc init file, variables
The @kbd{s p} (@code{calc-permanent-variable}) command saves a
-variable's value permanently in your @file{.emacs} file, so that its
-value will still be available in future Emacs sessions. You can
-re-execute @w{@kbd{s p}} later on to update the saved value, but the
-only way to remove a saved variable is to edit your @file{.emacs} file
+variable's value permanently in your Calc init file (the file given by
+the variable @code{calc-settings-file}, typically @file{~/.calc.el}), so
+that its value will still be available in future Emacs sessions. You
+can re-execute @w{@kbd{s p}} later on to update the saved value, but the
+only way to remove a saved variable is to edit your calc init file
by hand. (@xref{General Mode Commands}, for a way to tell Calc to
-use a different file instead of @file{.emacs}.)
+use a different file for the Calc init file.)
If you do not specify the name of a variable to save (i.e.,
@kbd{s p @key{RET}}), all Calc variables with defined values
The variables are written with the prefix @code{var-} in the form of
Lisp @code{setq} commands
which store the values in string form. You can place these commands
-in your @file{.emacs} buffer if you wish, though in this case it
+in your Calc init file (or @file{.emacs}) if you wish, though in this case it
would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i}
omits the same set of variables as @w{@kbd{s p @key{RET}}}; the difference
is that @kbd{s i} will store the variables in any buffer, and it also
@vindex calc-gnuplot-name
If you have GNUPLOT installed on your system but Calc is unable to
find it, you may need to set the @code{calc-gnuplot-name} variable
-in your @file{.emacs} file. You may also need to set some Lisp
+in your Calc init file or @file{.emacs}. You may also need to set some Lisp
variables to show Calc how to run GNUPLOT on your system; these
are described under @kbd{g D} and @kbd{g O} below. If you are
using the X window system, Calc will configure GNUPLOT for you
Two more mode-recording modes selectable by @kbd{m R} are @code{Save}
(which works even outside of Embedded mode), in which mode settings
-are recorded permanently in your Emacs startup file @file{~/.emacs}
+are recorded permanently in your Calc init file (the file given by the
+variable @code{calc-settings-file}, typically @file{~/.calc.el})
rather than by annotating the current document, and no-recording
mode (where there is no symbol like @code{Save} or @code{Local} in
the mode line), in which mode-changing commands do not leave any
You can modify Embedded mode's behavior by setting various Lisp
variables described here. Use @kbd{M-x set-variable} or
@kbd{M-x edit-options} to adjust a variable on the fly, or
-put a suitable @code{setq} statement in your @file{~/.emacs}
-file to set a variable permanently. (Another possibility would
+put a suitable @code{setq} statement in your Calc init file (or
+@file{~/.emacs}) to set a variable permanently. (Another possibility would
be to use a file-local variable annotation at the end of the
file; @pxref{File Variables, , Local Variables in Files, emacs, the
Emacs manual}.)
@pindex calc-user-define-permanent
@cindex Storing user definitions
@cindex Permanent user definitions
-@cindex @file{.emacs} file, user-defined commands
+@cindex Calc init file, user-defined commands
The @kbd{Z P} (@code{calc-user-define-permanent}) command makes a key
binding permanent so that it will remain in effect even in future Emacs
sessions. (It does this by adding a suitable bit of Lisp code into
-your @file{.emacs} file.) For example, @kbd{Z P s} would register
-our @code{sincos} command permanently. If you later wish to unregister
-this command you must edit your @file{.emacs} file by hand.
-(@xref{General Mode Commands}, for a way to tell Calc to use a
-different file instead of @file{.emacs}.)
+your Calc init file; that is, the file given by the variable
+@code{calc-settings-file}, typically @file{~/.calc.el}.) For example,
+@kbd{Z P s} would register our @code{sincos} command permanently. If
+you later wish to unregister this command you must edit your Calc init
+file by hand. (@xref{General Mode Commands}, for a way to tell Calc to
+use a different file for the Calc init file.)
The @kbd{Z P} command also saves the user definition, if any, for the
command bound to the key. After @kbd{Z F} and @kbd{Z C}, a given user
:"n * myfact(n-1)"
@end example
+A good place to put your @code{defmath} commands is your Calc init file
+(the file given by @code{calc-settings-file}, typically
+@file{~/.calc.el}), which will not be loaded until Calc starts.
If a file named @file{.emacs} exists in your home directory, Emacs reads
and executes the Lisp forms in this file as it starts up. While it may
-seem like a good idea to put your favorite @code{defmath} commands here,
+seem reasonable to put your favorite @code{defmath} commands there,
this has the unfortunate side-effect that parts of the Calculator must be
loaded in to process the @code{defmath} commands whether or not you will
-actually use the Calculator! A better effect can be had by writing
+actually use the Calculator! If you want to put the @code{defmath}
+commands there (for example, if you redefine @code{calc-settings-file}
+to be @file{.emacs}), a better effect can be had by writing
@example
(put 'calc-define 'thing '(progn
@defvar calc-mode-save-hook
This hook is called by the @code{calc-save-modes} command,
after Calc's own mode features have been inserted into the
-@file{.emacs} buffer and just before the ``End of mode settings''
+Calc init file and just before the ``End of mode settings''
message is inserted.
@end defvar
corresponding Lisp variable.
The remaining variables are Lisp variables suitable for @code{setq}ing
-in your @file{.emacs} file.
+in your Calc init file or @file{.emacs} file.
@printindex vr