aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra2005-04-03 13:53:56 +0000
committerLute Kamstra2005-04-03 13:53:56 +0000
commitdf16f4755b715f5164adc64c6a7bc6a8f9733987 (patch)
tree9d35e1014960682560d76c20ccd9e279a0b115df
parentaa945b597de91f6d780064b4a2a2df6c26ca1926 (diff)
downloademacs-df16f4755b715f5164adc64c6a7bc6a8f9733987.tar.gz
emacs-df16f4755b715f5164adc64c6a7bc6a8f9733987.zip
(Standard Hooks): Add some hooks. Add cross references and/or
descriptions. Delete major mode hooks; mention them as a category instead. Rename or delete obsolete hooks.
-rw-r--r--lispref/hooks.texi204
1 files changed, 160 insertions, 44 deletions
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 1aa22b94686..ea7c6605796 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2004 Free Software Foundation, Inc. 3@c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2004, 2005 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../info/hooks 5@setfilename ../info/hooks
6@node Standard Hooks, Index, Standard Keymaps, Top 6@node Standard Hooks, Index, Standard Keymaps, Top
@@ -16,6 +16,11 @@ arguments and their values are completely ignored. The recommended way
16to put a new function on such a hook is to call @code{add-hook}. 16to put a new function on such a hook is to call @code{add-hook}.
17@xref{Hooks}, for more information about using hooks. 17@xref{Hooks}, for more information about using hooks.
18 18
19Every major mode defines a mode hook named
20@samp{@var{modename}-mode-hook}. The major mode command runs this
21normal 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
19The variables whose names end in @samp{-hooks} or @samp{-functions} are 24The variables whose names end in @samp{-hooks} or @samp{-functions} are
20usually @dfn{abnormal hooks}; their values are lists of functions, but 25usually @dfn{abnormal hooks}; their values are lists of functions, but
21these functions are called in a special way (they are passed arguments, 26these functions are called in a special way (they are passed arguments,
@@ -28,118 +33,229 @@ as their values. (In older Emacs versions, some of these variables had
28names ending in @samp{-hook} even though they were not normal hooks; 33names ending in @samp{-hook} even though they were not normal hooks;
29however, we have renamed all of those.) 34however, we have renamed all of those.)
30 35
31@c !!! need xref to where each hook is documented or else document it 36@c We need to xref to where each hook is documented or else document
32@c by specifying what is expected, and when it is called relative to 37@c it here.
33@c mode initialization.
34 38
35@table @code 39@table @code
36@item activate-mark-hook 40@item activate-mark-hook
41@xref{The Mark}.
42
37@item after-change-functions 43@item after-change-functions
44@xref{Change Hooks}.
45
38@item after-change-major-mode-hook 46@item after-change-major-mode-hook
47@xref{Mode Hooks}.
48
39@item after-init-hook 49@item after-init-hook
50@xref{Init File}.
51
40@item after-insert-file-functions 52@item after-insert-file-functions
53@xref{Saving Properties}.
54
41@item after-make-frame-functions 55@item after-make-frame-functions
56@xref{Creating Frames}.
57
42@item after-revert-hook 58@item after-revert-hook
59@xref{Reverting}.
60
43@item after-save-hook 61@item after-save-hook
44@item apropos-mode-hook 62@xref{Saving Buffers}.
63
45@item auto-fill-function 64@item auto-fill-function
65@xref{Auto Filling}.
66
46@item auto-save-hook 67@item auto-save-hook
68@xref{Auto-Saving}.
69
47@item before-change-functions 70@item before-change-functions
71@xref{Change Hooks}.
72
48@item before-init-hook 73@item before-init-hook
74@xref{Init File}.
75
49@item before-make-frame-hook 76@item before-make-frame-hook
77@xref{Creating Frames}.
78
50@item before-revert-hook 79@item before-revert-hook
80@xref{Reverting}.
81
51@item before-save-hook 82@item before-save-hook
83@xref{Saving Buffers}.
84
52@item blink-paren-function 85@item blink-paren-function
86@xref{Blinking}.
87
53@item buffer-access-fontify-functions 88@item buffer-access-fontify-functions
54@item c-mode-hook 89@xref{Lazy Properties}.
90
55@item calendar-load-hook 91@item calendar-load-hook
92@inforef{Calendar Customizing,, emacs-xtra}.
93
56@item change-major-mode-hook 94@item change-major-mode-hook
57@item command-history-hook 95@xref{Creating Buffer-Local}.
96
58@item command-line-functions 97@item command-line-functions
98@xref{Command-Line Arguments}.
99
59@item comment-indent-function 100@item comment-indent-function
101@xref{Options for Comments,, Options Controlling Comments, emacs, the
102GNU Emacs Manual}.
103
60@item custom-define-hook 104@item custom-define-hook
105Hook called after defining each customize option.
106
61@item deactivate-mark-hook 107@item deactivate-mark-hook
108@xref{The Mark}.
109
62@item desktop-after-read-hook 110@item desktop-after-read-hook
111Normal hook run after a successful @code{desktop-read}. May be used
112to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs
113Sessions, emacs, the GNU Emacs Manual}.
114
63@item desktop-no-desktop-file-hook 115@item desktop-no-desktop-file-hook
116Normal hook run when @code{desktop-read} can't find a desktop file.
117May be used to show a dired buffer. @xref{Saving Emacs Sessions,,
118Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
119
64@item desktop-save-hook 120@item desktop-save-hook
121Normal hook run before the desktop is saved in a desktop file. This
122is useful for truncating history lists, for example. @xref{Saving
123Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
124
65@item diary-display-hook 125@item diary-display-hook
126@inforef{Fancy Diary Display,, emacs-xtra}.
127
66@item diary-hook 128@item diary-hook
67@item dired-mode-hook 129List of functions called after the display of the diary. Can be used
130for appointment notification.
131
68@item disabled-command-function 132@item disabled-command-function
133@xref{Disabling Commands}.
134
69@item echo-area-clear-hook 135@item echo-area-clear-hook
70@item edit-picture-hook 136@xref{The Echo Area}.
71@item electric-buffer-menu-mode-hook 137
72@item electric-command-history-hook 138@item emacs-startup-hook
73@item electric-help-mode-hook 139@xref{Init File}.
74@item emacs-lisp-mode-hook 140
75@item find-file-hook 141@item find-file-hook
142@xref{Visiting Functions}.
143
76@item find-file-not-found-functions 144@item find-file-not-found-functions
145@xref{Visiting Functions}.
146
77@item first-change-hook 147@item first-change-hook
78@item fortran-comment-hook 148@xref{Change Hooks}.
79@item fortran-mode-hook 149
80@item indent-mim-hook
81@item initial-calendar-window-hook 150@item initial-calendar-window-hook
151@inforef{Calendar Customizing,, emacs-xtra}.
152
82@item kbd-macro-termination-hook 153@item kbd-macro-termination-hook
154@xref{Keyboard Macros}.
155
83@item kill-buffer-hook 156@item kill-buffer-hook
157@xref{Killing Buffers}.
158
84@item kill-buffer-query-functions 159@item kill-buffer-query-functions
160@xref{Killing Buffers}.
161
85@item kill-emacs-hook 162@item kill-emacs-hook
163@xref{Killing Emacs}.
164
86@item kill-emacs-query-functions 165@item kill-emacs-query-functions
87@item LaTeX-mode-hook 166@xref{Killing Emacs}.
88@item ledit-mode-hook 167
89@item lisp-indent-function 168@item lisp-indent-function
90@item lisp-interaction-mode-hook 169
91@item lisp-mode-hook
92@item list-diary-entries-hook 170@item list-diary-entries-hook
93@item mail-mode-hook 171@inforef{Fancy Diary Display,, emacs-xtra}.
172
94@item mail-setup-hook 173@item mail-setup-hook
174@xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs
175Manual}.
176
95@item mark-diary-entries-hook 177@item mark-diary-entries-hook
96@item medit-mode-hook 178@inforef{Fancy Diary Display,, emacs-xtra}.
179
97@item menu-bar-update-hook 180@item menu-bar-update-hook
181@xref{Menu Bar}.
182
98@item minibuffer-setup-hook 183@item minibuffer-setup-hook
184@xref{Minibuffer Misc}.
185
99@item minibuffer-exit-hook 186@item minibuffer-exit-hook
187@xref{Minibuffer Misc}.
188
100@item mouse-position-function 189@item mouse-position-function
101@item news-mode-hook 190@xref{Mouse Position}.
102@item news-reply-mode-hook 191
103@item news-setup-hook
104@item nongregorian-diary-listing-hook 192@item nongregorian-diary-listing-hook
193@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
194
105@item nongregorian-diary-marking-hook 195@item nongregorian-diary-marking-hook
106@item nroff-mode-hook 196@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
107@item outline-mode-hook 197
108@item plain-TeX-mode-hook
109@item post-command-hook 198@item post-command-hook
199@xref{Command Overview}.
200
110@item pre-abbrev-expand-hook 201@item pre-abbrev-expand-hook
202@xref{Abbrev Expansion}.
203
111@item pre-command-hook 204@item pre-command-hook
205@xref{Command Overview}.
206
112@item print-diary-entries-hook 207@item print-diary-entries-hook
113@item prolog-mode-hook 208@inforef{Diary Customizing,, emacs-xtra}.
114@item protect-innocence-hook 209
115@item redisplay-end-trigger-functions 210@item redisplay-end-trigger-functions
116@item rmail-edit-mode-hook 211@xref{Window Hooks}.
117@item rmail-mode-hook 212
118@item rmail-summary-mode-hook 213@item scheme-indent-function
119@item scheme-indent-hook 214
120@item scheme-mode-hook
121@item scribe-mode-hook
122@item shell-mode-hook
123@item shell-set-directory-error-hook
124@item suspend-hook 215@item suspend-hook
216@xref{Suspending Emacs}.
217
125@item suspend-resume-hook 218@item suspend-resume-hook
219@xref{Suspending Emacs}.
220
221@item temp-buffer-setup-hook
222@xref{Temporary Displays}.
223
126@item temp-buffer-show-function 224@item temp-buffer-show-function
225@xref{Temporary Displays}.
226
227@item temp-buffer-show-hook
228@xref{Temporary Displays}.
229
127@item term-setup-hook 230@item term-setup-hook
128@item terminal-mode-hook 231@xref{Terminal-Specific}.
129@item terminal-mode-break-hook 232
130@item TeX-mode-hook
131@item text-mode-hook
132@item today-visible-calendar-hook 233@item today-visible-calendar-hook
234@inforef{Calendar Customizing,, emacs-xtra}.
235
133@item today-invisible-calendar-hook 236@item today-invisible-calendar-hook
134@item vi-mode-hook 237@inforef{Calendar Customizing,, emacs-xtra}.
135@item view-hook 238
136@item window-configuration-change-hook 239@item window-configuration-change-hook
240@xref{Window Hooks}.
241
137@item window-scroll-functions 242@item window-scroll-functions
243@xref{Window Hooks}.
244
138@item window-setup-hook 245@item window-setup-hook
246@xref{Window Systems}.
247
139@item window-size-change-functions 248@item window-size-change-functions
249@xref{Window Hooks}.
250
140@item write-contents-functions 251@item write-contents-functions
252@xref{Saving Buffers}.
253
141@item write-file-functions 254@item write-file-functions
255@xref{Saving Buffers}.
256
142@item write-region-annotate-functions 257@item write-region-annotate-functions
258@xref{Saving Properties}.
143@end table 259@end table
144 260
145@ignore 261@ignore