Mercurial > emacs
annotate doc/lispref/hooks.texi @ 98978:f570df2cc52d
*** empty log message ***
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 21 Oct 2008 13:46:08 +0000 |
parents | 6212560661dc |
children | cb5d2387102c |
rev | line source |
---|---|
84074 | 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, | |
87649 | 4 @c 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
84074 | 5 @c See the file elisp.texi for copying conditions. |
84116
0ba80d073e27
(setfilename): Go up one more level to ../../info.
Glenn Morris <rgm@gnu.org>
parents:
84074
diff
changeset
|
6 @setfilename ../../info/hooks |
84074 | 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 | |
87098 | 34 A special feature allows you to specify expressions to evaluate if and |
35 when a file is loaded (@pxref{Hooks for Loading}). That feature is | |
36 not exactly a hook, but does a similar job. | |
37 | |
84074 | 38 @c We need to xref to where each hook is documented or else document |
39 @c it here. | |
40 | |
41 @table @code | |
42 @item activate-mark-hook | |
43 @xref{The Mark}. | |
44 | |
45 @item after-change-functions | |
46 @xref{Change Hooks}. | |
47 | |
48 @item after-change-major-mode-hook | |
49 @xref{Mode Hooks}. | |
50 | |
51 @item after-init-hook | |
52 @xref{Init File}. | |
53 | |
54 @item after-insert-file-functions | |
55 @xref{Format Conversion}. | |
56 | |
57 @item after-make-frame-functions | |
58 @xref{Creating Frames}. | |
59 | |
60 @item after-revert-hook | |
61 @xref{Reverting}. | |
62 | |
63 @item after-save-hook | |
64 @xref{Saving Buffers}. | |
65 | |
66 @item auto-fill-function | |
67 @xref{Auto Filling}. | |
68 | |
69 @item auto-save-hook | |
70 @xref{Auto-Saving}. | |
71 | |
72 @item before-change-functions | |
73 @xref{Change Hooks}. | |
74 | |
98880
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
75 @item before-hack-local-variables-hook |
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
76 @xref{File Local Variables}. |
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
77 |
84074 | 78 @item before-init-hook |
79 @xref{Init File}. | |
80 | |
81 @item before-make-frame-hook | |
82 @xref{Creating Frames}. | |
83 | |
84 @item before-revert-hook | |
85 @xref{Reverting}. | |
86 | |
87 @item before-save-hook | |
88 @xref{Saving Buffers}. | |
89 | |
90 @item blink-paren-function | |
91 @xref{Blinking}. | |
92 | |
93 @item buffer-access-fontify-functions | |
94 @xref{Lazy Properties}. | |
95 | |
96 @item calendar-load-hook | |
97 @iftex | |
98 @inforef{Calendar Customizing,, emacs-xtra}. | |
99 @end iftex | |
100 @ifnottex | |
101 @xref{Calendar Customizing,,, emacs}. | |
102 @end ifnottex | |
103 | |
104 | |
105 @item change-major-mode-hook | |
106 @xref{Creating Buffer-Local}. | |
107 | |
108 @item command-line-functions | |
109 @xref{Command-Line Arguments}. | |
110 | |
111 @item comment-indent-function | |
112 @xref{Options for Comments,, Options Controlling Comments, emacs, the | |
113 GNU Emacs Manual}. | |
114 | |
115 @item compilation-finish-functions | |
116 Functions to call when a compilation process finishes. | |
117 | |
118 @item custom-define-hook | |
119 Hook called after defining each customize option. | |
120 | |
121 @item deactivate-mark-hook | |
122 @xref{The Mark}. | |
123 | |
124 @item desktop-after-read-hook | |
125 Normal hook run after a successful @code{desktop-read}. May be used | |
126 to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs | |
127 Sessions, emacs, the GNU Emacs Manual}. | |
128 | |
129 @item desktop-no-desktop-file-hook | |
130 Normal hook run when @code{desktop-read} can't find a desktop file. | |
131 May be used to show a dired buffer. @xref{Saving Emacs Sessions,, | |
132 Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
133 | |
134 @item desktop-save-hook | |
135 Normal hook run before the desktop is saved in a desktop file. This | |
136 is useful for truncating history lists, for example. @xref{Saving | |
137 Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | |
138 | |
139 @item diary-display-hook | |
140 @iftex | |
141 @inforef{Fancy Diary Display,, emacs-xtra}. | |
142 @end iftex | |
143 @ifnottex | |
144 @xref{Fancy Diary Display,,, emacs}. | |
145 @end ifnottex | |
146 | |
147 @item diary-hook | |
148 List of functions called after the display of the diary. Can be used | |
149 for appointment notification. | |
150 | |
151 @item disabled-command-function | |
152 @xref{Disabling Commands}. | |
153 | |
154 @item echo-area-clear-hook | |
155 @xref{Echo Area Customization}. | |
156 | |
157 @item emacs-startup-hook | |
158 @xref{Init File}. | |
159 | |
160 @item find-file-hook | |
161 @xref{Visiting Functions}. | |
162 | |
163 @item find-file-not-found-functions | |
164 @xref{Visiting Functions}. | |
165 | |
166 @item first-change-hook | |
167 @xref{Change Hooks}. | |
168 | |
169 @item font-lock-beginning-of-syntax-function | |
170 @xref{Syntactic Font Lock}. | |
171 | |
172 @item font-lock-fontify-buffer-function | |
173 @xref{Other Font Lock Variables}. | |
174 | |
175 @item font-lock-fontify-region-function | |
176 @xref{Other Font Lock Variables}. | |
177 | |
178 @item font-lock-mark-block-function | |
179 @xref{Other Font Lock Variables}. | |
180 | |
181 @item font-lock-syntactic-face-function | |
182 @xref{Syntactic Font Lock}. | |
183 | |
184 @item font-lock-unfontify-buffer-function | |
185 @xref{Other Font Lock Variables}. | |
186 | |
98880
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
187 @item hack-local-variables-hook |
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
188 @xref{File Local Variables}. |
6212560661dc
Mention `before-hack-local-variables-hook' and `hack-local-variables-hook'.
Eli Zaretskii <eliz@gnu.org>
parents:
87649
diff
changeset
|
189 |
84074 | 190 @item font-lock-unfontify-region-function |
191 @xref{Other Font Lock Variables}. | |
192 | |
193 @item initial-calendar-window-hook | |
194 @iftex | |
195 @inforef{Calendar Customizing,, emacs-xtra}. | |
196 @end iftex | |
197 @ifnottex | |
198 @xref{Calendar Customizing,,, emacs}. | |
199 @end ifnottex | |
200 | |
201 @item kbd-macro-termination-hook | |
202 @xref{Keyboard Macros}. | |
203 | |
204 @item kill-buffer-hook | |
205 @xref{Killing Buffers}. | |
206 | |
207 @item kill-buffer-query-functions | |
208 @xref{Killing Buffers}. | |
209 | |
210 @item kill-emacs-hook | |
211 @xref{Killing Emacs}. | |
212 | |
213 @item kill-emacs-query-functions | |
214 @xref{Killing Emacs}. | |
215 | |
216 @item lisp-indent-function | |
217 | |
218 @item list-diary-entries-hook | |
219 @iftex | |
220 @inforef{Fancy Diary Display,, emacs-xtra}. | |
221 @end iftex | |
222 @ifnottex | |
223 @xref{Fancy Diary Display,,, emacs}. | |
224 @end ifnottex | |
225 | |
226 @item mail-setup-hook | |
227 @xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs | |
228 Manual}. | |
229 | |
230 @item mark-diary-entries-hook | |
231 @iftex | |
232 @inforef{Fancy Diary Display,, emacs-xtra}. | |
233 @end iftex | |
234 @ifnottex | |
235 @xref{Fancy Diary Display,,, emacs}. | |
236 @end ifnottex | |
237 | |
238 @item menu-bar-update-hook | |
239 @xref{Menu Bar}. | |
240 | |
241 @item minibuffer-setup-hook | |
242 @xref{Minibuffer Misc}. | |
243 | |
244 @item minibuffer-exit-hook | |
245 @xref{Minibuffer Misc}. | |
246 | |
247 @item mouse-position-function | |
248 @xref{Mouse Position}. | |
249 | |
250 @item nongregorian-diary-listing-hook | |
251 @iftex | |
252 @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | |
253 @end iftex | |
254 @ifnottex | |
255 @xref{Hebrew/Islamic Entries,,, emacs}. | |
256 @end ifnottex | |
257 | |
258 @item nongregorian-diary-marking-hook | |
259 @iftex | |
260 @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | |
261 @end iftex | |
262 @ifnottex | |
263 @xref{Hebrew/Islamic Entries,,, emacs}. | |
264 @end ifnottex | |
265 | |
266 @item occur-hook | |
267 | |
268 @item post-command-hook | |
269 @xref{Command Overview}. | |
270 | |
271 @item pre-abbrev-expand-hook | |
272 @xref{Abbrev Expansion}. | |
273 | |
274 @item pre-command-hook | |
275 @xref{Command Overview}. | |
276 | |
277 @item print-diary-entries-hook | |
278 @iftex | |
279 @inforef{Diary Customizing,, emacs-xtra}. | |
280 @end iftex | |
281 @ifnottex | |
282 @xref{Diary Customizing,,, emacs}. | |
283 @end ifnottex | |
284 | |
285 @item redisplay-end-trigger-functions | |
286 @xref{Window Hooks}. | |
287 | |
288 @item scheme-indent-function | |
289 | |
290 @item suspend-hook | |
291 @xref{Suspending Emacs}. | |
292 | |
293 @item suspend-resume-hook | |
294 @xref{Suspending Emacs}. | |
295 | |
296 @item temp-buffer-setup-hook | |
297 @xref{Temporary Displays}. | |
298 | |
299 @item temp-buffer-show-function | |
300 @xref{Temporary Displays}. | |
301 | |
302 @item temp-buffer-show-hook | |
303 @xref{Temporary Displays}. | |
304 | |
305 @item term-setup-hook | |
306 @xref{Terminal-Specific}. | |
307 | |
308 @item today-visible-calendar-hook | |
309 @iftex | |
310 @inforef{Calendar Customizing,, emacs-xtra}. | |
311 @end iftex | |
312 @ifnottex | |
313 @xref{Calendar Customizing,,, emacs}. | |
314 @end ifnottex | |
315 | |
316 @item today-invisible-calendar-hook | |
317 @iftex | |
318 @inforef{Calendar Customizing,, emacs-xtra}. | |
319 @end iftex | |
320 @ifnottex | |
321 @xref{Calendar Customizing,,, emacs}. | |
322 @end ifnottex | |
323 | |
324 @item window-configuration-change-hook | |
325 @xref{Window Hooks}. | |
326 | |
327 @item window-scroll-functions | |
328 @xref{Window Hooks}. | |
329 | |
330 @item window-setup-hook | |
331 @xref{Window Systems}. | |
332 | |
333 @item window-size-change-functions | |
334 @xref{Window Hooks}. | |
335 | |
336 @item write-contents-functions | |
337 @xref{Saving Buffers}. | |
338 | |
339 @item write-file-functions | |
340 @xref{Saving Buffers}. | |
341 | |
342 @item write-region-annotate-functions | |
343 @xref{Format Conversion}. | |
344 @end table | |
345 | |
346 @ignore | |
347 arch-tag: 55fd0296-d906-4551-b300-979d3846aa88 | |
348 @end ignore |