Hooks are variables which contain Lisp functions (or lists of functions)
which are called at various times. Calc defines a number of hooks
that help you to customize it in various ways. Calc uses the Lisp
run-hooks to invoke the hooks shown below. Several
other customization-related variables are also described here.
This hook is called at the end of `calc.el', after the file has
been loaded, before any functions in it have been called, but after
calc-mode-map and similar variables have been set up.
This hook is called at the end of `calc-ext.el'.
This hook is called as the last step in a M-x calc command. At this point, the Calc buffer has been created and initialized if necessary, the Calc window and trail window have been created, and the "Welcome to Calc" message has been displayed.
This hook is called when the Calc buffer is being created. Usually
this will only happen once per Emacs session. The hook is called
after Emacs has switched to the new buffer, the mode-settings file
has been read if necessary, and all other buffer-local variables
have been set up. After this hook returns, Calc will perform a
calc-refresh operation, set up the mode line display, then
evaluate any deferred
calc-define properties that have not
been evaluated yet.
This hook is called when the Calc Trail buffer is being created.
It is called as the very last step of setting up the Trail buffer.
calc-mode-hook, this will normally happen only once
per Emacs session.
This hook is called by
calc-quit, generally because the user
presses q or M-# c while in Calc. The Calc buffer will
be the current buffer. The hook is called as the very first
step, before the Calc window is destroyed.
If this hook exists, it is called to create the Calc window.
Upon return, this new Calc window should be the current window.
(The Calc buffer will already be the current buffer when the
hook is called.) If the hook is not defined, Calc will
select-window to create the Calc window.
If this hook exists, it is called to create the Calc Trail window.
calc-trail-buffer will contain the buffer
which the window should use. Unlike
this hook must not switch into the new window.
This hook is called by
calc-edit (and the other "edit"
commands) when the temporary editing buffer is being created.
The buffer will have been selected and set up to be in
calc-edit-mode, but will not yet have been filled with
text. (In fact it may still have leftover text from a previous
This hook is called by the
after Calc's own mode features have been inserted into the
`.emacs' buffer and just before the "End of mode settings"
message is inserted.
This hook is called after M-# 0 (
reset all modes. The Calc buffer will be the current buffer.
This variable contains a list of strings. The strings are
concatenated at the end of the modes portion of the Calc
mode line (after standard modes such as "Deg", "Inv" and
"Hyp"). Each string should be a short, single word followed
by a space. The variable is
nil by default.
This is the keymap that is used by Calc mode. The best time
to adjust it is probably in a
calc-mode-hook. If the
Calc extensions package (`calc-ext.el') has not yet been
loaded, many of these keys will be bound to
which is a command that loads the extensions package and
"retypes" the key. If your
one of these keys, it will probably be overridden when the
extensions are loaded.
This is the keymap that is used during numeric entry. Numeric
entry uses the minibuffer, but this map binds every non-numeric
calcDigit-nondigit which generally calls
exit-minibuffer and "retypes" the key.
This is the keymap that is used during algebraic entry. This is
mostly a copy of
This is the keymap that is used during entry of variable names for
calc-recall. This is
mostly a copy of
This is the (sparse) keymap used by
calc-edit and other
temporary editing commands. It binds RET, LFD,
and C-c C-c to
This is a list of variables which are saved by
Each entry is a list of two items, the variable (as a Lisp symbol)
and its default value. When modes are being saved, each variable
is compared with its default value (using
equal) and any
non-default variables are written out.
This is a list of variables which should be buffer-local to the
Calc buffer. Each entry is a variable name (as a Lisp symbol).
These variables also have their default values manipulated by
calc-quit commands; see section Multiple Calculators.
calc-mode-hook is called after this list has been
used the first time, your hook should add a variable to the
list and also call