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