The following is a list of hook variables that let you provide functions to be called from within Emacs on suitable occasions.
Most of these variables have names ending with ‘-hook’. They are
normal hooks, run by means of run-hooks. The value of such
a hook is a list of functions; the functions are called with no
arguments and their values are completely ignored. The recommended way
to put a new function on such a hook is to call add-hook.
See Hooks, for more information about using hooks.
Every major mode defines a mode hook named
‘modename-mode-hook’. The major mode command runs this
normal hook with run-mode-hooks as the very last thing it does.
See Mode Hooks. Most minor modes have mode hooks too. Mode hooks
are omitted in the list below.
The variables whose names end in ‘-hooks’ or ‘-functions’ are usually abnormal hooks; their values are lists of functions, but these functions are called in a special way (they are passed arguments, or their values are used). The variables whose names end in ‘-function’ have single functions as their values.
A special feature allows you to specify expressions to evaluate if and when a file is loaded (see Hooks for Loading). That feature is not exactly a hook, but does a similar job.
abbrev-expand-functionsactivate-mark-hookafter-change-functionsafter-change-major-mode-hookafter-init-hookafter-insert-file-functionsafter-make-frame-functionsafter-revert-hookafter-save-hookauto-fill-functionauto-save-hookbefore-change-functionsbefore-hack-local-variables-hookbefore-init-hookbefore-make-frame-hookbefore-revert-hookbefore-save-hookblink-paren-functionbuffer-access-fontify-functionscalendar-initial-window-hookcalendar-load-hookcalendar-today-invisible-hookcalendar-today-visible-hookchange-major-mode-hookcommand-line-functionscomment-indent-functioncompilation-finish-functionscustom-define-hookdeactivate-mark-hookdelete-frame-functionsdelete-terminal-functionsdesktop-after-read-hookdesktop-read. May be used
to show a buffer list. See Saving Emacs Sessions.
desktop-no-desktop-file-hookdesktop-read can't find a desktop file.
May be used to show a dired buffer. See Saving Emacs Sessions.
desktop-save-hookdiary-hookdiary-list-entries-hookdiary-mark-entries-hookdiary-nongregorian-listing-hookdiary-nongregorian-marking-hookdiary-print-entries-hookdisabled-command-functionecho-area-clear-hookemacs-startup-hookfind-file-hookfind-file-not-found-functionsfirst-change-hookfont-lock-beginning-of-syntax-functionfont-lock-fontify-buffer-functionfont-lock-fontify-region-functionfont-lock-mark-block-functionfont-lock-syntactic-face-functionfont-lock-unfontify-buffer-functionhack-local-variables-hookfont-lock-unfontify-region-functionkbd-macro-termination-hookkill-buffer-hookkill-buffer-query-functionskill-emacs-hookkill-emacs-query-functionslisp-indent-function
mail-setup-hookmenu-bar-update-hookminibuffer-setup-hookminibuffer-exit-hookmouse-position-functionoccur-hook
post-command-hookpre-command-hookresume-tty-functionsscheme-indent-function
suspend-hooksuspend-resume-hooksuspend-tty-functionstemp-buffer-setup-hooktemp-buffer-show-functiontemp-buffer-show-hookterm-setup-hookwindow-configuration-change-hookwindow-scroll-functionswindow-setup-hookwindow-size-change-functionswrite-contents-functionswrite-file-functionswrite-region-annotate-functions