Commit | Line | Data |
---|---|---|
b8d4c8d0 GM |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Emacs Lisp Reference Manual. | |
3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2001, 2002, 2003, 2004, | |
4 | @c 2005, 2006, 2007 Free Software Foundation, Inc. | |
5 | @c See the file elisp.texi for copying conditions. | |
6 | @setfilename ../info/hooks | |
7 | @node Standard Hooks, Index, Standard Keymaps, Top | |
8 | @appendix Standard Hooks | |
9 | @cindex standard hooks | |
10 | @cindex hook variables, list of | |
11 | ||
12 | The following is a list of hook variables that let you provide | |
13 | functions to be called from within Emacs on suitable occasions. | |
14 | ||
15 | Most of these variables have names ending with @samp{-hook}. They are | |
16 | @dfn{normal hooks}, run by means of @code{run-hooks}. The value of such | |
17 | a hook is a list of functions; the functions are called with no | |
18 | arguments and their values are completely ignored. The recommended way | |
19 | to put a new function on such a hook is to call @code{add-hook}. | |
20 | @xref{Hooks}, for more information about using hooks. | |
21 | ||
22 | Every major mode defines a mode hook named | |
23 | @samp{@var{modename}-mode-hook}. The major mode command runs this | |
24 | normal hook with @code{run-mode-hooks} as the very last thing it does. | |
25 | @xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks | |
26 | are omitted in the list below. | |
27 | ||
28 | The variables whose names end in @samp{-hooks} or @samp{-functions} are | |
29 | usually @dfn{abnormal hooks}; their values are lists of functions, but | |
30 | these functions are called in a special way (they are passed arguments, | |
31 | or their values are used). The variables whose names end in | |
32 | @samp{-function} have single functions as their values. | |
33 | ||
34 | @c We need to xref to where each hook is documented or else document | |
35 | @c it here. | |
36 | ||
37 | @table @code | |
38 | @item activate-mark-hook | |
39 | @xref{The Mark}. | |
40 | ||
41 | @item after-change-functions | |
42 | @xref{Change Hooks}. | |
43 | ||
44 | @item after-change-major-mode-hook | |
45 | @xref{Mode Hooks}. | |
46 | ||
47 | @item after-init-hook | |
48 | @xref{Init File}. | |
49 | ||
50 | @item after-insert-file-functions | |
51 | @xref{Format Conversion}. | |
52 | ||
53 | @item after-make-frame-functions | |
54 | @xref{Creating Frames}. | |
55 | ||
56 | @item after-revert-hook | |
57 | @xref{Reverting}. | |
58 | ||
59 | @item after-save-hook | |
60 | @xref{Saving Buffers}. | |
61 | ||
62 | @item auto-fill-function | |
63 | @xref{Auto Filling}. | |
64 | ||
65 | @item auto-save-hook | |
66 | @xref{Auto-Saving}. | |
67 | ||
68 | @item before-change-functions | |
69 | @xref{Change Hooks}. | |
70 | ||
71 | @item before-init-hook | |
72 | @xref{Init File}. | |
73 | ||
74 | @item before-make-frame-hook | |
75 | @xref{Creating Frames}. | |
76 | ||
77 | @item before-revert-hook | |
78 | @xref{Reverting}. | |
79 | ||
80 | @item before-save-hook | |
81 | @xref{Saving Buffers}. | |
82 | ||
83 | @item blink-paren-function | |
84 | @xref{Blinking}. | |
85 | ||
86 | @item buffer-access-fontify-functions | |
87 | @xref{Lazy Properties}. | |
88 | ||
89 | @item calendar-load-hook | |
90 | @iftex | |
91 | @inforef{Calendar Customizing,, emacs-xtra}. | |
92 | @end iftex | |
93 | @ifnottex | |
94 | @xref{Calendar Customizing,,, emacs}. | |
95 | @end ifnottex | |
96 | ||
97 | ||
98 | @item change-major-mode-hook | |
99 | @xref{Creating Buffer-Local}. | |
100 | ||
101 | @item command-line-functions | |
102 | @xref{Command-Line Arguments}. | |
103 | ||
104 | @item comment-indent-function | |
105 | @xref{Options for Comments,, Options Controlling Comments, emacs, the | |
106 | GNU Emacs Manual}. | |
107 | ||
108 | @item compilation-finish-functions | |
109 | Functions to call when a compilation process finishes. | |
110 | ||
111 | @item custom-define-hook | |
112 | Hook called after defining each customize option. | |
113 | ||
114 | @item deactivate-mark-hook | |
115 | @xref{The Mark}. | |
116 | ||
117 | @item desktop-after-read-hook | |
118 | Normal hook run after a successful @code{desktop-read}. May be used | |
119 | to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs | |
120 | Sessions, emacs, the GNU Emacs Manual}. | |
121 | ||
122 | @item desktop-no-desktop-file-hook | |
123 | Normal hook run when @code{desktop-read} can't find a desktop file. | |
124 | May be used to show a dired buffer. @xref{Saving Emacs Sessions,, | |
125 | Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
126 | ||
127 | @item desktop-save-hook | |
128 | Normal hook run before the desktop is saved in a desktop file. This | |
129 | is useful for truncating history lists, for example. @xref{Saving | |
130 | Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
131 | ||
132 | @item diary-display-hook | |
133 | @iftex | |
134 | @inforef{Fancy Diary Display,, emacs-xtra}. | |
135 | @end iftex | |
136 | @ifnottex | |
137 | @xref{Fancy Diary Display,,, emacs}. | |
138 | @end ifnottex | |
139 | ||
140 | @item diary-hook | |
141 | List of functions called after the display of the diary. Can be used | |
142 | for appointment notification. | |
143 | ||
144 | @item disabled-command-function | |
145 | @xref{Disabling Commands}. | |
146 | ||
147 | @item echo-area-clear-hook | |
148 | @xref{Echo Area Customization}. | |
149 | ||
150 | @item emacs-startup-hook | |
151 | @xref{Init File}. | |
152 | ||
153 | @item find-file-hook | |
154 | @xref{Visiting Functions}. | |
155 | ||
156 | @item find-file-not-found-functions | |
157 | @xref{Visiting Functions}. | |
158 | ||
159 | @item first-change-hook | |
160 | @xref{Change Hooks}. | |
161 | ||
162 | @item font-lock-beginning-of-syntax-function | |
163 | @xref{Syntactic Font Lock}. | |
164 | ||
165 | @item font-lock-fontify-buffer-function | |
166 | @xref{Other Font Lock Variables}. | |
167 | ||
168 | @item font-lock-fontify-region-function | |
169 | @xref{Other Font Lock Variables}. | |
170 | ||
171 | @item font-lock-mark-block-function | |
172 | @xref{Other Font Lock Variables}. | |
173 | ||
174 | @item font-lock-syntactic-face-function | |
175 | @xref{Syntactic Font Lock}. | |
176 | ||
177 | @item font-lock-unfontify-buffer-function | |
178 | @xref{Other Font Lock Variables}. | |
179 | ||
180 | @item font-lock-unfontify-region-function | |
181 | @xref{Other Font Lock Variables}. | |
182 | ||
183 | @item initial-calendar-window-hook | |
184 | @iftex | |
185 | @inforef{Calendar Customizing,, emacs-xtra}. | |
186 | @end iftex | |
187 | @ifnottex | |
188 | @xref{Calendar Customizing,,, emacs}. | |
189 | @end ifnottex | |
190 | ||
191 | @item kbd-macro-termination-hook | |
192 | @xref{Keyboard Macros}. | |
193 | ||
194 | @item kill-buffer-hook | |
195 | @xref{Killing Buffers}. | |
196 | ||
197 | @item kill-buffer-query-functions | |
198 | @xref{Killing Buffers}. | |
199 | ||
200 | @item kill-emacs-hook | |
201 | @xref{Killing Emacs}. | |
202 | ||
203 | @item kill-emacs-query-functions | |
204 | @xref{Killing Emacs}. | |
205 | ||
206 | @item lisp-indent-function | |
207 | ||
208 | @item list-diary-entries-hook | |
209 | @iftex | |
210 | @inforef{Fancy Diary Display,, emacs-xtra}. | |
211 | @end iftex | |
212 | @ifnottex | |
213 | @xref{Fancy Diary Display,,, emacs}. | |
214 | @end ifnottex | |
215 | ||
216 | @item mail-setup-hook | |
217 | @xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs | |
218 | Manual}. | |
219 | ||
220 | @item mark-diary-entries-hook | |
221 | @iftex | |
222 | @inforef{Fancy Diary Display,, emacs-xtra}. | |
223 | @end iftex | |
224 | @ifnottex | |
225 | @xref{Fancy Diary Display,,, emacs}. | |
226 | @end ifnottex | |
227 | ||
228 | @item menu-bar-update-hook | |
229 | @xref{Menu Bar}. | |
230 | ||
231 | @item minibuffer-setup-hook | |
232 | @xref{Minibuffer Misc}. | |
233 | ||
234 | @item minibuffer-exit-hook | |
235 | @xref{Minibuffer Misc}. | |
236 | ||
237 | @item mouse-position-function | |
238 | @xref{Mouse Position}. | |
239 | ||
240 | @item nongregorian-diary-listing-hook | |
241 | @iftex | |
242 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | |
243 | @end iftex | |
244 | @ifnottex | |
245 | @xref{Hebrew/Islamic Entries,,, emacs}. | |
246 | @end ifnottex | |
247 | ||
248 | @item nongregorian-diary-marking-hook | |
249 | @iftex | |
250 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | |
251 | @end iftex | |
252 | @ifnottex | |
253 | @xref{Hebrew/Islamic Entries,,, emacs}. | |
254 | @end ifnottex | |
255 | ||
256 | @item occur-hook | |
257 | ||
258 | @item post-command-hook | |
259 | @xref{Command Overview}. | |
260 | ||
261 | @item pre-abbrev-expand-hook | |
262 | @xref{Abbrev Expansion}. | |
263 | ||
264 | @item pre-command-hook | |
265 | @xref{Command Overview}. | |
266 | ||
267 | @item print-diary-entries-hook | |
268 | @iftex | |
269 | @inforef{Diary Customizing,, emacs-xtra}. | |
270 | @end iftex | |
271 | @ifnottex | |
272 | @xref{Diary Customizing,,, emacs}. | |
273 | @end ifnottex | |
274 | ||
275 | @item redisplay-end-trigger-functions | |
276 | @xref{Window Hooks}. | |
277 | ||
278 | @item scheme-indent-function | |
279 | ||
280 | @item suspend-hook | |
281 | @xref{Suspending Emacs}. | |
282 | ||
283 | @item suspend-resume-hook | |
284 | @xref{Suspending Emacs}. | |
285 | ||
286 | @item temp-buffer-setup-hook | |
287 | @xref{Temporary Displays}. | |
288 | ||
289 | @item temp-buffer-show-function | |
290 | @xref{Temporary Displays}. | |
291 | ||
292 | @item temp-buffer-show-hook | |
293 | @xref{Temporary Displays}. | |
294 | ||
295 | @item term-setup-hook | |
296 | @xref{Terminal-Specific}. | |
297 | ||
298 | @item today-visible-calendar-hook | |
299 | @iftex | |
300 | @inforef{Calendar Customizing,, emacs-xtra}. | |
301 | @end iftex | |
302 | @ifnottex | |
303 | @xref{Calendar Customizing,,, emacs}. | |
304 | @end ifnottex | |
305 | ||
306 | @item today-invisible-calendar-hook | |
307 | @iftex | |
308 | @inforef{Calendar Customizing,, emacs-xtra}. | |
309 | @end iftex | |
310 | @ifnottex | |
311 | @xref{Calendar Customizing,,, emacs}. | |
312 | @end ifnottex | |
313 | ||
314 | @item window-configuration-change-hook | |
315 | @xref{Window Hooks}. | |
316 | ||
317 | @item window-scroll-functions | |
318 | @xref{Window Hooks}. | |
319 | ||
320 | @item window-setup-hook | |
321 | @xref{Window Systems}. | |
322 | ||
323 | @item window-size-change-functions | |
324 | @xref{Window Hooks}. | |
325 | ||
326 | @item write-contents-functions | |
327 | @xref{Saving Buffers}. | |
328 | ||
329 | @item write-file-functions | |
330 | @xref{Saving Buffers}. | |
331 | ||
332 | @item write-region-annotate-functions | |
333 | @xref{Format Conversion}. | |
334 | @end table | |
335 | ||
336 | @ignore | |
337 | arch-tag: 55fd0296-d906-4551-b300-979d3846aa88 | |
338 | @end ignore |