2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
4 @c See the file elisp.texi for copying conditions.
5 @setfilename ../info/hooks
6 @node Standard Hooks, Index, Standard Keymaps, Top
7 @appendix Standard Hooks
9 The following is a list of hook variables that let you provide
10 functions to be called from within Emacs on suitable occasions.
12 Most of these variables have names ending with @samp{-hook}. They are
13 @dfn{normal hooks}, run by means of @code{run-hooks}. The value of such
14 a hook is a list of functions. The recommended way to put a new
15 function on such a hook is to call @code{add-hook}. @xref{Hooks}, for
16 more information about using hooks.
18 The variables whose names end in @samp{-function} have single functions
19 as their values. Usually there is a specific reason why the variable is
20 not a normal hook, such as the need to pass arguments to the function.
21 (In older Emacs versions, some of these variables had names ending in
22 @samp{-hook} even though they were not normal hooks.)
24 The variables whose names end in @samp{-hooks} or @samp{-functions} have
25 lists of functions as their values, but these functions are called in a
26 special way (they are passed arguments, or else their values are used).
28 @c !!! need xref to where each hook is documented or else document it
29 @c by specifying what is expected, and when it is called relative to
30 @c mode initialization.)
33 @item activate-mark-hook
34 @item after-change-function
35 @item after-change-functions
37 @item after-insert-file-functions
38 @item after-make-frame-hook
39 @item auto-fill-function
41 @item before-change-function
42 @item before-change-functions
43 @item before-init-hook
44 @item before-make-frame-hook
45 @item blink-paren-function
47 @item calendar-load-hook
48 @item command-history-hook
49 @item comment-indent-function
50 @item deactivate-mark-hook
51 @item diary-display-hook
54 @item disabled-command-hook
55 @item edit-picture-hook
56 @item electric-buffer-menu-mode-hook
57 @item electric-command-history-hook
58 @item electric-help-mode-hook
59 @item emacs-lisp-mode-hook
61 @item find-file-not-found-hooks
62 @item first-change-hook
63 @item fortran-comment-hook
64 @item fortran-mode-hook
65 @item ftp-setup-write-file-hooks
66 @item ftp-write-file-hook
68 @item initial-calendar-window-hook
69 @item kill-buffer-query-functions
70 @item kill-emacs-query-functions
73 @item lisp-indent-function
74 @item lisp-interaction-mode-hook
76 @item list-diary-entries-hook
80 @item mark-diary-entries-hook
82 @item mh-compose-letter-hook
83 @item mh-folder-mode-hook
84 @item mh-letter-mode-hook
86 @item minibuffer-setup-hook
87 @item minibuffer-exit-hook
89 @item news-reply-mode-hook
91 @item nongregorian-diary-listing-hook
92 @item nongregorian-diary-marking-hook
94 @item outline-mode-hook
95 @item plain-TeX-mode-hook
96 @item post-command-hook
97 @item pre-abbrev-expand-hook
98 @item pre-command-hook
99 @item print-diary-entries-hook
100 @item prolog-mode-hook
101 @item protect-innocence-hook
102 @item rmail-edit-mode-hook
103 @item rmail-mode-hook
104 @item rmail-summary-mode-hook
105 @item scheme-indent-hook
106 @item scheme-mode-hook
107 @item scribe-mode-hook
108 @item shell-mode-hook
109 @item shell-set-directory-error-hook
111 @item suspend-resume-hook
112 @item temp-buffer-show-function
113 @item term-setup-hook
114 @item terminal-mode-hook
115 @item terminal-mode-break-hook
118 @item today-visible-calendar-hook
119 @item today-invisible-calendar-hook
122 @item window-setup-hook
123 @item write-contents-hooks
124 @item write-file-hooks
125 @item write-region-annotate-functions