Commit | Line | Data |
---|---|---|
89851a09 RS |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Emacs Lisp Reference Manual. | |
df16f475 | 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2004, 2005 Free Software Foundation, Inc. |
89851a09 RS |
4 | @c See the file elisp.texi for copying conditions. |
5 | @setfilename ../info/hooks | |
bfe721d1 | 6 | @node Standard Hooks, Index, Standard Keymaps, Top |
89851a09 RS |
7 | @appendix Standard Hooks |
8 | ||
5632e6b4 | 9 | The following is a list of hook variables that let you provide |
177c0ea7 | 10 | functions to be called from within Emacs on suitable occasions. |
89851a09 | 11 | |
5632e6b4 RS |
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 | |
dd73b091 RS |
14 | a hook is a list of functions; the functions are called with no |
15 | arguments and their values are completely ignored. The recommended way | |
16 | to put a new function on such a hook is to call @code{add-hook}. | |
17 | @xref{Hooks}, for more information about using hooks. | |
89851a09 | 18 | |
df16f475 LK |
19 | Every major mode defines a mode hook named |
20 | @samp{@var{modename}-mode-hook}. The major mode command runs this | |
21 | normal hook with @code{run-mode-hooks} as the very last thing it does. | |
22 | @xref{Mode Hooks}. Mode hooks are omitted in the list below. | |
23 | ||
dd73b091 RS |
24 | The variables whose names end in @samp{-hooks} or @samp{-functions} are |
25 | usually @dfn{abnormal hooks}; their values are lists of functions, but | |
26 | these functions are called in a special way (they are passed arguments, | |
27 | or their values are used). A few of these variables are actually normal | |
28 | hooks which were named before we established the convention that normal | |
29 | hooks' names should end in @samp{-hook}. | |
89851a09 | 30 | |
dd73b091 RS |
31 | The variables whose names end in @samp{-function} have single functions |
32 | as their values. (In older Emacs versions, some of these variables had | |
33 | names ending in @samp{-hook} even though they were not normal hooks; | |
34 | however, we have renamed all of those.) | |
89851a09 | 35 | |
df16f475 LK |
36 | @c We need to xref to where each hook is documented or else document |
37 | @c it here. | |
89851a09 RS |
38 | |
39 | @table @code | |
40 | @item activate-mark-hook | |
df16f475 LK |
41 | @xref{The Mark}. |
42 | ||
72654a3c | 43 | @item after-change-functions |
df16f475 LK |
44 | @xref{Change Hooks}. |
45 | ||
8a4e8a7f | 46 | @item after-change-major-mode-hook |
df16f475 LK |
47 | @xref{Mode Hooks}. |
48 | ||
89851a09 | 49 | @item after-init-hook |
df16f475 LK |
50 | @xref{Init File}. |
51 | ||
89851a09 | 52 | @item after-insert-file-functions |
df16f475 LK |
53 | @xref{Saving Properties}. |
54 | ||
fa00d3b6 | 55 | @item after-make-frame-functions |
df16f475 LK |
56 | @xref{Creating Frames}. |
57 | ||
f9f59935 | 58 | @item after-revert-hook |
df16f475 LK |
59 | @xref{Reverting}. |
60 | ||
f9f59935 | 61 | @item after-save-hook |
df16f475 LK |
62 | @xref{Saving Buffers}. |
63 | ||
89851a09 | 64 | @item auto-fill-function |
df16f475 LK |
65 | @xref{Auto Filling}. |
66 | ||
89851a09 | 67 | @item auto-save-hook |
df16f475 LK |
68 | @xref{Auto-Saving}. |
69 | ||
72654a3c | 70 | @item before-change-functions |
df16f475 LK |
71 | @xref{Change Hooks}. |
72 | ||
89851a09 | 73 | @item before-init-hook |
df16f475 LK |
74 | @xref{Init File}. |
75 | ||
89851a09 | 76 | @item before-make-frame-hook |
df16f475 LK |
77 | @xref{Creating Frames}. |
78 | ||
f9f59935 | 79 | @item before-revert-hook |
df16f475 LK |
80 | @xref{Reverting}. |
81 | ||
a0465ec3 | 82 | @item before-save-hook |
df16f475 LK |
83 | @xref{Saving Buffers}. |
84 | ||
89851a09 | 85 | @item blink-paren-function |
df16f475 LK |
86 | @xref{Blinking}. |
87 | ||
f9f59935 | 88 | @item buffer-access-fontify-functions |
df16f475 LK |
89 | @xref{Lazy Properties}. |
90 | ||
89851a09 | 91 | @item calendar-load-hook |
df16f475 LK |
92 | @inforef{Calendar Customizing,, emacs-xtra}. |
93 | ||
f9f59935 | 94 | @item change-major-mode-hook |
df16f475 LK |
95 | @xref{Creating Buffer-Local}. |
96 | ||
f9f59935 | 97 | @item command-line-functions |
df16f475 LK |
98 | @xref{Command-Line Arguments}. |
99 | ||
89851a09 | 100 | @item comment-indent-function |
df16f475 LK |
101 | @xref{Options for Comments,, Options Controlling Comments, emacs, the |
102 | GNU Emacs Manual}. | |
103 | ||
b26d003a | 104 | @item custom-define-hook |
df16f475 LK |
105 | Hook called after defining each customize option. |
106 | ||
89851a09 | 107 | @item deactivate-mark-hook |
df16f475 LK |
108 | @xref{The Mark}. |
109 | ||
27758c56 | 110 | @item desktop-after-read-hook |
df16f475 LK |
111 | Normal hook run after a successful @code{desktop-read}. May be used |
112 | to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs | |
113 | Sessions, emacs, the GNU Emacs Manual}. | |
114 | ||
27758c56 | 115 | @item desktop-no-desktop-file-hook |
df16f475 LK |
116 | Normal hook run when @code{desktop-read} can't find a desktop file. |
117 | May be used to show a dired buffer. @xref{Saving Emacs Sessions,, | |
118 | Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
119 | ||
27758c56 | 120 | @item desktop-save-hook |
df16f475 LK |
121 | Normal hook run before the desktop is saved in a desktop file. This |
122 | is useful for truncating history lists, for example. @xref{Saving | |
123 | Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
124 | ||
89851a09 | 125 | @item diary-display-hook |
df16f475 LK |
126 | @inforef{Fancy Diary Display,, emacs-xtra}. |
127 | ||
89851a09 | 128 | @item diary-hook |
df16f475 LK |
129 | List of functions called after the display of the diary. Can be used |
130 | for appointment notification. | |
131 | ||
27e8464d | 132 | @item disabled-command-function |
df16f475 LK |
133 | @xref{Disabling Commands}. |
134 | ||
f9f59935 | 135 | @item echo-area-clear-hook |
df16f475 LK |
136 | @xref{The Echo Area}. |
137 | ||
138 | @item emacs-startup-hook | |
139 | @xref{Init File}. | |
140 | ||
f2aa473a | 141 | @item find-file-hook |
df16f475 LK |
142 | @xref{Visiting Functions}. |
143 | ||
f2aa473a | 144 | @item find-file-not-found-functions |
df16f475 LK |
145 | @xref{Visiting Functions}. |
146 | ||
89851a09 | 147 | @item first-change-hook |
df16f475 LK |
148 | @xref{Change Hooks}. |
149 | ||
89851a09 | 150 | @item initial-calendar-window-hook |
df16f475 LK |
151 | @inforef{Calendar Customizing,, emacs-xtra}. |
152 | ||
42703598 | 153 | @item kbd-macro-termination-hook |
df16f475 LK |
154 | @xref{Keyboard Macros}. |
155 | ||
f9f59935 | 156 | @item kill-buffer-hook |
df16f475 LK |
157 | @xref{Killing Buffers}. |
158 | ||
89851a09 | 159 | @item kill-buffer-query-functions |
df16f475 LK |
160 | @xref{Killing Buffers}. |
161 | ||
f9f59935 | 162 | @item kill-emacs-hook |
df16f475 LK |
163 | @xref{Killing Emacs}. |
164 | ||
89851a09 | 165 | @item kill-emacs-query-functions |
df16f475 LK |
166 | @xref{Killing Emacs}. |
167 | ||
89851a09 | 168 | @item lisp-indent-function |
df16f475 | 169 | |
89851a09 | 170 | @item list-diary-entries-hook |
df16f475 LK |
171 | @inforef{Fancy Diary Display,, emacs-xtra}. |
172 | ||
89851a09 | 173 | @item mail-setup-hook |
df16f475 LK |
174 | @xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs |
175 | Manual}. | |
176 | ||
89851a09 | 177 | @item mark-diary-entries-hook |
df16f475 LK |
178 | @inforef{Fancy Diary Display,, emacs-xtra}. |
179 | ||
f9f59935 | 180 | @item menu-bar-update-hook |
df16f475 LK |
181 | @xref{Menu Bar}. |
182 | ||
89851a09 | 183 | @item minibuffer-setup-hook |
df16f475 LK |
184 | @xref{Minibuffer Misc}. |
185 | ||
72654a3c | 186 | @item minibuffer-exit-hook |
df16f475 LK |
187 | @xref{Minibuffer Misc}. |
188 | ||
97dad108 | 189 | @item mouse-position-function |
df16f475 LK |
190 | @xref{Mouse Position}. |
191 | ||
89851a09 | 192 | @item nongregorian-diary-listing-hook |
df16f475 LK |
193 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. |
194 | ||
89851a09 | 195 | @item nongregorian-diary-marking-hook |
df16f475 LK |
196 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. |
197 | ||
89851a09 | 198 | @item post-command-hook |
df16f475 LK |
199 | @xref{Command Overview}. |
200 | ||
89851a09 | 201 | @item pre-abbrev-expand-hook |
df16f475 LK |
202 | @xref{Abbrev Expansion}. |
203 | ||
89851a09 | 204 | @item pre-command-hook |
df16f475 LK |
205 | @xref{Command Overview}. |
206 | ||
89851a09 | 207 | @item print-diary-entries-hook |
df16f475 LK |
208 | @inforef{Diary Customizing,, emacs-xtra}. |
209 | ||
f9f59935 | 210 | @item redisplay-end-trigger-functions |
df16f475 LK |
211 | @xref{Window Hooks}. |
212 | ||
213 | @item scheme-indent-function | |
214 | ||
89851a09 | 215 | @item suspend-hook |
df16f475 LK |
216 | @xref{Suspending Emacs}. |
217 | ||
89851a09 | 218 | @item suspend-resume-hook |
df16f475 LK |
219 | @xref{Suspending Emacs}. |
220 | ||
221 | @item temp-buffer-setup-hook | |
222 | @xref{Temporary Displays}. | |
223 | ||
89851a09 | 224 | @item temp-buffer-show-function |
df16f475 LK |
225 | @xref{Temporary Displays}. |
226 | ||
227 | @item temp-buffer-show-hook | |
228 | @xref{Temporary Displays}. | |
229 | ||
89851a09 | 230 | @item term-setup-hook |
df16f475 LK |
231 | @xref{Terminal-Specific}. |
232 | ||
89851a09 | 233 | @item today-visible-calendar-hook |
df16f475 LK |
234 | @inforef{Calendar Customizing,, emacs-xtra}. |
235 | ||
89851a09 | 236 | @item today-invisible-calendar-hook |
df16f475 LK |
237 | @inforef{Calendar Customizing,, emacs-xtra}. |
238 | ||
f9f59935 | 239 | @item window-configuration-change-hook |
df16f475 LK |
240 | @xref{Window Hooks}. |
241 | ||
f9f59935 | 242 | @item window-scroll-functions |
df16f475 LK |
243 | @xref{Window Hooks}. |
244 | ||
89851a09 | 245 | @item window-setup-hook |
df16f475 LK |
246 | @xref{Window Systems}. |
247 | ||
f9f59935 | 248 | @item window-size-change-functions |
df16f475 LK |
249 | @xref{Window Hooks}. |
250 | ||
f2aa473a | 251 | @item write-contents-functions |
df16f475 LK |
252 | @xref{Saving Buffers}. |
253 | ||
f2aa473a | 254 | @item write-file-functions |
df16f475 LK |
255 | @xref{Saving Buffers}. |
256 | ||
bfe721d1 | 257 | @item write-region-annotate-functions |
df16f475 | 258 | @xref{Saving Properties}. |
89851a09 | 259 | @end table |
ab5796a9 MB |
260 | |
261 | @ignore | |
262 | arch-tag: 55fd0296-d906-4551-b300-979d3846aa88 | |
263 | @end ignore |