The following is a list of hook variables which let you provide functions to be called from within Emacs on suitable occasions.
Most of these variables have names ending with `-hook' are
normal hooks, that are run with run-hooks
. The value of
such a hook is a list of functions. The recommended way to put a new
function on such a hook is to call add-hook
. See section Hooks, for
more information about using hooks.
The variables whose names end in `-function' have single functions as their values. Usually there is a specific reason why the variable is not a normal hook, such as, the need to pass an argument to the function. (In older Emacs versions, some of these variables had names ending in `-hook' even though they were not normal hooks.)
The variables whose names end in `-hooks' have lists of functions as their values, but these functions are called in a special way (they are passed arguments, or else their values are used).
activate-mark-hook
after-change-function
after-change-functions
after-init-hook
after-insert-file-functions
after-make-frame-hook
auto-fill-function
auto-save-hook
before-change-function
before-change-functions
before-init-hook
before-make-frame-hook
blink-paren-function
c-mode-hook
calendar-load-hook
command-history-hook
comment-indent-function
deactivate-mark-hook
diary-display-hook
diary-hook
dired-mode-hook
disabled-command-hook
edit-picture-hook
electric-buffer-menu-mode-hook
electric-command-history-hook
electric-help-mode-hook
emacs-lisp-mode-hook
find-file-hooks
find-file-not-found-hooks
first-change-hook
fortran-comment-hook
fortran-mode-hook
ftp-setup-write-file-hooks
ftp-write-file-hook
indent-mim-hook
initial-calendar-window-hook
kill-buffer-query-functions
kill-emacs-query-functions
LaTeX-mode-hook
ledit-mode-hook
lisp-indent-function
lisp-interaction-mode-hook
lisp-mode-hook
list-diary-entries-hook
m2-mode-hook
mail-mode-hook
mail-setup-hook
mark-diary-entries-hook
medit-mode-hook
mh-compose-letter-hook
mh-folder-mode-hook
mh-letter-mode-hook
mim-mode-hook
minibuffer-setup-hook
minibuffer-exit-hook
news-mode-hook
news-reply-mode-hook
news-setup-hook
nongregorian-diary-listing-hook
nongregorian-diary-marking-hook
nroff-mode-hook
outline-mode-hook
plain-TeX-mode-hook
post-command-hook
pre-abbrev-expand-hook
pre-command-hook
print-diary-entries-hook
prolog-mode-hook
protect-innocence-hook
rmail-edit-mode-hook
rmail-mode-hook
rmail-summary-mode-hook
scheme-indent-hook
scheme-mode-hook
scribe-mode-hook
shell-mode-hook
shell-set-directory-error-hook
suspend-hook
suspend-resume-hook
temp-buffer-show-function
term-setup-hook
terminal-mode-hook
terminal-mode-break-hook
TeX-mode-hook
text-mode-hook
today-visible-calendar-hook
today-invisible-calendar-hook
vi-mode-hook
view-hook
window-setup-hook
write-contents-hooks
write-file-hooks
write-region-annotation-functions