Standard Hooks
**************

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).  A few of these variables are actually normal hooks which were named before we established the convention that normal hooks' names should end in -hook.

The variables whose names end in -function have single functions as their values.  (In older Emacs versions, some of these variables had names ending in -hook even though they were not normal hooks; however, we have renamed all of those.)

activate-mark-hook
     See The Mark.

after-change-functions
     See Change Hooks.

after-change-major-mode-hook
     See Mode Hooks.

after-init-hook
     See Init File.

after-insert-file-functions
     See Saving Properties.

after-make-frame-functions
     See Creating Frames.

after-revert-hook
     See Reverting.

after-save-hook
     See Saving Buffers.

auto-fill-function
     See Auto Filling.

auto-save-hook
     See Auto-Saving.

before-change-functions
     See Change Hooks.

before-init-hook
     See Init File.

before-make-frame-hook
     See Creating Frames.

before-revert-hook
     See Reverting.

before-save-hook
     See Saving Buffers.

blink-paren-function
     See Blinking.

buffer-access-fontify-functions
     See Lazy Properties.

calendar-load-hook
     See Calendar Customizing (emacs-xtra).

change-major-mode-hook
     See Creating Buffer-Local.

command-line-functions
     See Command-Line Arguments.

comment-indent-function
     See Options Controlling Comments (the GNU Emacs Manual).

custom-define-hook
     Hook called after defining each customize option.

deactivate-mark-hook
     See The Mark.

desktop-after-read-hook
     Normal hook run after a successful desktop-read.  May be used to show a buffer list.  See Saving Emacs Sessions (the GNU Emacs Manual).

desktop-no-desktop-file-hook
     Normal hook run when desktop-read can't find a desktop file. May be used to show a dired buffer.  See Saving Emacs Sessions (the GNU Emacs Manual).

desktop-save-hook
     Normal hook run before the desktop is saved in a desktop file.  This is useful for truncating history lists, for example.  See Saving Emacs Sessions (the GNU Emacs Manual).

diary-display-hook
     See Fancy Diary Display (emacs-xtra).

diary-hook
     List of functions called after the display of the diary.  Can be used for appointment notification.

disabled-command-function
     See Disabling Commands.

echo-area-clear-hook
     See The Echo Area.

emacs-startup-hook
     See Init File.

find-file-hook
     See Visiting Functions.

find-file-not-found-functions
     See Visiting Functions.

first-change-hook
     See Change Hooks.

font-lock-beginning-of-syntax-function
     See Syntactic Font Lock.

font-lock-fontify-buffer-function
     See Other Font Lock Variables.

font-lock-fontify-region-function
     See Other Font Lock Variables.

font-lock-mark-block-function
     See Other Font Lock Variables.

font-lock-syntactic-face-function
     See Syntactic Font Lock.

font-lock-unfontify-buffer-function
     See Other Font Lock Variables.

font-lock-unfontify-region-function
     See Other Font Lock Variables.

initial-calendar-window-hook
     See Calendar Customizing (emacs-xtra).

kbd-macro-termination-hook
     See Keyboard Macros.

kill-buffer-hook
     See Killing Buffers.

kill-buffer-query-functions
     See Killing Buffers.

kill-emacs-hook
     See Killing Emacs.

kill-emacs-query-functions
     See Killing Emacs.

lisp-indent-function

list-diary-entries-hook
     See Fancy Diary Display (emacs-xtra).

mail-setup-hook
     See Mail Mode Miscellany (the GNU Emacs Manual).

mark-diary-entries-hook
     See Fancy Diary Display (emacs-xtra).

menu-bar-update-hook
     See Menu Bar.

minibuffer-setup-hook
     See Minibuffer Misc.

minibuffer-exit-hook
     See Minibuffer Misc.

mouse-position-function
     See Mouse Position.

nongregorian-diary-listing-hook
     See Hebrew/Islamic Entries (emacs-xtra).

nongregorian-diary-marking-hook
     See Hebrew/Islamic Entries (emacs-xtra).

occur-hook

post-command-hook
     See Command Overview.

pre-abbrev-expand-hook
     See Abbrev Expansion.

pre-command-hook
     See Command Overview.

print-diary-entries-hook
     See Diary Customizing (emacs-xtra).

redisplay-end-trigger-functions
     See Window Hooks.

scheme-indent-function

suspend-hook
     See Suspending Emacs.

suspend-resume-hook
     See Suspending Emacs.

temp-buffer-setup-hook
     See Temporary Displays.

temp-buffer-show-function
     See Temporary Displays.

temp-buffer-show-hook
     See Temporary Displays.

term-setup-hook
     See Terminal-Specific.

today-visible-calendar-hook
     See Calendar Customizing (emacs-xtra).

today-invisible-calendar-hook
     See Calendar Customizing (emacs-xtra).

window-configuration-change-hook
     See Window Hooks.

window-scroll-functions
     See Window Hooks.

window-setup-hook
     See Window Systems.

window-size-change-functions
     See Window Hooks.

write-contents-functions
     See Saving Buffers.

write-file-functions
     See Saving Buffers.

write-region-annotate-functions
     See Saving Properties.