aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-03-01 21:52:40 -0500
committerGlenn Morris2012-03-01 21:52:40 -0500
commit2064cc6ade0763a931ba14f71e357d6bee139747 (patch)
tree4fe7b9f8201dc4f2522321763aafe25e3537c8b6
parenteec1549a6b89359b6d970f14dead275e59b7bc6f (diff)
downloademacs-2064cc6ade0763a931ba14f71e357d6bee139747.tar.gz
emacs-2064cc6ade0763a931ba14f71e357d6bee139747.zip
Checked lispref/hooks.texi
* doc/lispref/hooks.texi (Standard Hooks): General update. Put related hooks together. * doc/lispref/commands.texi (Keyboard Macros): Remove cross-ref to Standard Hooks. * doc/lispref/modes.texi (Hooks): Tweak cross-ref description. Remove non-standard file-local fill-column (2010-05-13T03:55:46Z!rgm@gnu.org). * admin/FOR-RELEASE: Related markup.
-rw-r--r--admin/FOR-RELEASE2
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/commands.texi9
-rw-r--r--doc/lispref/hooks.texi267
-rw-r--r--doc/lispref/modes.texi9
5 files changed, 163 insertions, 131 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 563e1588e35..8e712f5fcf8 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -201,7 +201,7 @@ frames.texi
201functions.texi cyd 201functions.texi cyd
202hash.texi cyd 202hash.texi cyd
203help.texi cyd 203help.texi cyd
204hooks.texi 204hooks.texi rgm
205index.texi 205index.texi
206internals.texi 206internals.texi
207intro.texi cyd 207intro.texi cyd
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7e51c20dacb..85fea55c93f 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12012-03-02 Glenn Morris <rgm@gnu.org>
2
3 * hooks.texi (Standard Hooks): General update.
4 Put related hooks together. Add and remove items.
5 * commands.texi (Keyboard Macros): Remove cross-ref to Standard Hooks.
6 * modes.texi (Hooks): Tweak cross-ref description.
7
12012-03-01 Michael Albinus <michael.albinus@gmx.de> 82012-03-01 Michael Albinus <michael.albinus@gmx.de>
2 9
3 * files.texi (Kinds of Files): The return value of file-equal-p is 10 * files.texi (Kinds of Files): The return value of file-equal-p is
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index f4e7c922331..617f050f498 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1,7 +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-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/commands 5@setfilename ../../info/commands
7@node Command Loop, Keymaps, Minibuffers, Top 6@node Command Loop, Keymaps, Minibuffers, Top
@@ -3430,7 +3429,7 @@ buffer-local. @xref{Multiple Terminals}.
3430@end defvar 3429@end defvar
3431 3430
3432@defvar kbd-macro-termination-hook 3431@defvar kbd-macro-termination-hook
3433This normal hook (@pxref{Standard Hooks}) is run when a keyboard 3432This normal hook is run when a keyboard macro terminates, regardless
3434macro terminates, regardless of what caused it to terminate (reaching 3433of what caused it to terminate (reaching the macro end or an error
3435the macro end or an error which ended the macro prematurely). 3434which ended the macro prematurely).
3436@end defvar 3435@end defvar
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 95fc0365c07..0d29c25c8b1 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -8,7 +8,7 @@
8@cindex standard hooks 8@cindex standard hooks
9@cindex hook variables, list of 9@cindex hook variables, list of
10 10
11The following is a list of hook variables that let you provide 11The following is a list of some hook variables that let you provide
12functions to be called from within Emacs on suitable occasions. 12functions to be called from within Emacs on suitable occasions.
13 13
14Most of these variables have names ending with @samp{-hook}. They are 14Most of these variables have names ending with @samp{-hook}. They are
@@ -18,85 +18,92 @@ arguments and their values are completely ignored. The recommended way
18to put a new function on such a hook is to call @code{add-hook}. 18to put a new function on such a hook is to call @code{add-hook}.
19@xref{Hooks}, for more information about using hooks. 19@xref{Hooks}, for more information about using hooks.
20 20
21Every major mode defines a mode hook named
22@samp{@var{modename}-mode-hook}. The major mode command runs this
23normal hook with @code{run-mode-hooks} as the very last thing it does.
24@xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks
25are omitted from the list below.
26
27The variables whose names end in @samp{-hooks} or @samp{-functions} are 21The variables whose names end in @samp{-hooks} or @samp{-functions} are
28usually @dfn{abnormal hooks}; their values are lists of functions, but 22usually @dfn{abnormal hooks}; their values are lists of functions, but
29these functions are called in a special way (they are passed arguments, 23these functions are called in a special way (they are passed arguments,
30or their values are used). The variables whose names end in 24or their values are used). The variables whose names end in
31@samp{-function} have single functions as their values. 25@samp{-function} have single functions as their values.
32 26
27This is not an exhaustive list, it only covers the more general hooks.
28For example, every major mode defines a hook named
29@samp{@var{modename}-mode-hook}. The major mode command runs this
30normal hook with @code{run-mode-hooks} as the very last thing it does.
31@xref{Mode Hooks}. Most minor modes have mode hooks too.
32
33A special feature allows you to specify expressions to evaluate if and 33A special feature allows you to specify expressions to evaluate if and
34when a file is loaded (@pxref{Hooks for Loading}). That feature is 34when a file is loaded (@pxref{Hooks for Loading}). That feature is
35not exactly a hook, but does a similar job. 35not exactly a hook, but does a similar job.
36 36
37@c We need to xref to where each hook is documented or else document 37@c We need to xref to where each hook is documented or else document it here.
38@c it here. 38@c Add vindex for anything not indexed elsewhere.
39@c This list is in alphabetical order, grouped by topic.
40@c TODO It should probably be more thoroughly ordered by topic.
39 41
40@table @code 42@table @code
41@item abbrev-expand-functions
42@xref{Abbrev Expansion}.
43
44@item activate-mark-hook 43@item activate-mark-hook
44@itemx deactivate-mark-hook
45@xref{The Mark}. 45@xref{The Mark}.
46 46
47@item after-change-functions 47@item after-change-functions
48@itemx before-change-functions
49@itemx first-change-hook
48@xref{Change Hooks}. 50@xref{Change Hooks}.
49 51
50@item after-change-major-mode-hook 52@item after-change-major-mode-hook
53@itemx change-major-mode-after-body-hook
51@xref{Mode Hooks}. 54@xref{Mode Hooks}.
52 55
53@item after-init-hook 56@item after-init-hook
57@itemx before-init-hook
58@itemx emacs-startup-hook
54@xref{Init File}. 59@xref{Init File}.
55 60
56@item after-insert-file-functions 61@item after-insert-file-functions
62@itemx write-region-annotate-functions
63@itemx write-region-post-annotation-function
57@xref{Format Conversion}. 64@xref{Format Conversion}.
58 65
59@item after-make-frame-functions 66@item after-make-frame-functions
67@itemx before-make-frame-hook
60@xref{Creating Frames}. 68@xref{Creating Frames}.
61 69
70@c Not general enough?
71@ignore
62@item after-revert-hook 72@item after-revert-hook
73@itemx before-revert-hook
74@itemx buffer-stale-function
75@itemx revert-buffer-function
76@itemx revert-buffer-insert-file-contents-function
63@xref{Reverting}. 77@xref{Reverting}.
78@end ignore
64 79
65@item after-save-hook 80@item after-save-hook
81@itemx before-save-hook
82@itemx write-contents-functions
83@itemx write-file-functions
66@xref{Saving Buffers}. 84@xref{Saving Buffers}.
67 85
68@item auto-fill-function 86@item after-setting-font-hook
69@xref{Auto Filling}. 87@vindex after-setting-font-hook
88Hook run after a frame's font changes.
70 89
71@item auto-save-hook 90@item auto-save-hook
72@xref{Auto-Saving}. 91@xref{Auto-Saving}.
73 92
74@item before-change-functions
75@xref{Change Hooks}.
76
77@item before-hack-local-variables-hook 93@item before-hack-local-variables-hook
94@itemx hack-local-variables-hook
78@xref{File Local Variables}. 95@xref{File Local Variables}.
79 96
80@item before-init-hook
81@xref{Init File}.
82
83@item before-make-frame-hook
84@xref{Creating Frames}.
85
86@item before-revert-hook
87@xref{Reverting}.
88
89@item before-save-hook
90@xref{Saving Buffers}.
91
92@item blink-paren-function
93@xref{Blinking}.
94
95@item buffer-access-fontify-functions 97@item buffer-access-fontify-functions
96@xref{Lazy Properties}. 98@xref{Lazy Properties}.
97 99
98@item change-major-mode-after-body-hook 100@item buffer-list-update-hook
99@xref{Mode Hooks}. 101@vindex buffer-list-update-hook
102Hook run when the buffer list changes.
103
104@item buffer-quit-function
105@vindex buffer-quit-function
106Function to call to ``quit'' the current buffer.
100 107
101@item change-major-mode-hook 108@item change-major-mode-hook
102@xref{Creating Buffer-Local}. 109@xref{Creating Buffer-Local}.
@@ -104,151 +111,175 @@ not exactly a hook, but does a similar job.
104@item command-line-functions 111@item command-line-functions
105@xref{Command-Line Arguments}. 112@xref{Command-Line Arguments}.
106 113
107@item comment-indent-function 114@item delayed-warnings-hook
108@xref{Options for Comments,, Options Controlling Comments, emacs, the 115@vindex delayed-warnings-hook
109GNU Emacs Manual}. 116The command loop runs this soon after @code{post-command-hook} (q.v.).
110
111@item compilation-finish-functions
112Functions to call when a compilation process finishes.
113
114@item custom-define-hook
115Hook called after defining each customize option.
116
117@item deactivate-mark-hook
118@xref{The Mark}.
119 117
120@item delete-frame-functions 118@item delete-frame-functions
121Functions to call when Emacs deletes a frame. @xref{Deleting Frames}. 119@xref{Deleting Frames}.
122 120
123@item delete-terminal-functions 121@item delete-terminal-functions
124Functions to call when Emacs deletes a terminal. @xref{Multiple Terminals}. 122@xref{Multiple Terminals}.
125 123
124@ignore
126@item disabled-command-function 125@item disabled-command-function
127@xref{Disabling Commands}. 126@xref{Disabling Commands}.
127@end ignore
128
129@item display-buffer-function
130@itemx pop-up-frame-function
131@itemx special-display-function
132@itemx split-window-preferred-function
133@xref{Choosing Window Options}.
128 134
129@item echo-area-clear-hook 135@item echo-area-clear-hook
130@xref{Echo Area Customization}. 136@xref{Echo Area Customization}.
131 137
132@item emacs-startup-hook
133@xref{Init File}.
134
135@item find-file-hook 138@item find-file-hook
139@itemx find-file-not-found-functions
136@xref{Visiting Functions}. 140@xref{Visiting Functions}.
137 141
138@item find-file-not-found-functions 142@item font-lock-extend-after-change-region-function
139@xref{Visiting Functions}. 143@xref{Region to Refontify}.
140
141@item first-change-hook
142@xref{Change Hooks}.
143 144
144@item font-lock-beginning-of-syntax-function 145@item font-lock-extend-region-functions
145@xref{Syntactic Font Lock}. 146@xref{Multiline Font Lock}.
146 147
147@item font-lock-fontify-buffer-function 148@item font-lock-fontify-buffer-function
149@itemx font-lock-fontify-region-function
150@itemx font-lock-mark-block-function
151@itemx font-lock-unfontify-buffer-function
152@itemx font-lock-unfontify-region-function
148@xref{Other Font Lock Variables}. 153@xref{Other Font Lock Variables}.
149 154
150@item font-lock-fontify-region-function 155@item fontification-functions
151@xref{Other Font Lock Variables}. 156@xref{Auto Faces,, Automatic Face Assignment}.
152
153@item font-lock-mark-block-function
154@xref{Other Font Lock Variables}.
155 157
156@item font-lock-syntactic-face-function 158@item frame-auto-hide-function
157@xref{Syntactic Font Lock}. 159@xref{Quitting Windows}.
158
159@item font-lock-unfontify-buffer-function
160@xref{Other Font Lock Variables}.
161
162@item hack-local-variables-hook
163@xref{File Local Variables}.
164
165@item font-lock-unfontify-region-function
166@xref{Other Font Lock Variables}.
167
168@item kbd-macro-termination-hook
169@xref{Keyboard Macros}.
170 160
171@item kill-buffer-hook 161@item kill-buffer-hook
172@xref{Killing Buffers}. 162@itemx kill-buffer-query-functions
173
174@item kill-buffer-query-functions
175@xref{Killing Buffers}. 163@xref{Killing Buffers}.
176 164
177@item kill-emacs-hook 165@item kill-emacs-hook
166@itemx kill-emacs-query-functions
178@xref{Killing Emacs}. 167@xref{Killing Emacs}.
179 168
180@item kill-emacs-query-functions
181@xref{Killing Emacs}.
182
183@item mail-setup-hook
184@xref{Mail Misc,, Mail Miscellany, emacs, the GNU Emacs Manual}.
185
186@item menu-bar-update-hook 169@item menu-bar-update-hook
187@xref{Menu Bar}. 170@xref{Menu Bar}.
188 171
189@item minibuffer-setup-hook 172@item minibuffer-setup-hook
173@itemx minibuffer-exit-hook
190@xref{Minibuffer Misc}. 174@xref{Minibuffer Misc}.
191 175
192@item minibuffer-exit-hook 176@item mouse-leave-buffer-hook
193@xref{Minibuffer Misc}. 177@vindex mouse-leave-buffer-hook
178Hook run when about to switch windows with a mouse command.
194 179
195@item mouse-position-function 180@item mouse-position-function
196@xref{Mouse Position}. 181@xref{Mouse Position}.
197 182
198@item post-command-hook 183@item post-command-hook
184@itemx pre-command-hook
199@xref{Command Overview}. 185@xref{Command Overview}.
200 186
187@item post-gc-hook
188@xref{Garbage Collection}.
189
201@item post-self-insert-hook 190@item post-self-insert-hook
202@xref{Keymaps and Minor Modes}. 191@xref{Keymaps and Minor Modes}.
203 192
204@item pre-command-hook 193@ignore
205@xref{Command Overview}.
206
207@item prog-mode-hook 194@item prog-mode-hook
195@itemx special-mode-hook
196@vindex special-mode-hook
208@xref{Basic Major Modes}. 197@xref{Basic Major Modes}.
209 198@end ignore
210@item resume-tty-functions
211@xref{Suspending Emacs}.
212 199
213@item suspend-hook 200@item suspend-hook
201@itemx suspend-resume-hook
202@itemx suspend-tty-functions
203@itemx resume-tty-functions
214@xref{Suspending Emacs}. 204@xref{Suspending Emacs}.
215 205
216@item suspend-resume-hook 206@item syntax-begin-function
217@xref{Suspending Emacs}. 207@itemx syntax-propertize-extend-region-functions
218 208@itemx syntax-propertize-function
219@item suspend-tty-functions 209@itemx font-lock-syntactic-face-function
220@xref{Suspending Emacs}. 210@xref{Syntactic Font Lock}. @xref{Syntax Properties}.
221 211
222@item temp-buffer-setup-hook 212@item temp-buffer-setup-hook
223@xref{Temporary Displays}. 213@itemx temp-buffer-show-function
224 214@itemx temp-buffer-show-hook
225@item temp-buffer-show-function
226@xref{Temporary Displays}.
227
228@item temp-buffer-show-hook
229@xref{Temporary Displays}. 215@xref{Temporary Displays}.
230 216
231@item term-setup-hook 217@item term-setup-hook
232@xref{Terminal-Specific}. 218@xref{Terminal-Specific}.
233 219
234@item window-configuration-change-hook 220@item window-configuration-change-hook
235@xref{Window Hooks}. 221@itemx window-scroll-functions
236 222@itemx window-size-change-functions
237@item window-scroll-functions
238@xref{Window Hooks}. 223@xref{Window Hooks}.
239 224
240@item window-setup-hook 225@item window-setup-hook
241@xref{Window Systems}. 226@xref{Window Systems}.
242 227
243@item window-size-change-functions 228@item window-text-change-functions
244@xref{Window Hooks}. 229@vindex window-text-change-functions
245 230Functions to call in redisplay when text in the window might change.
246@item write-contents-functions
247@xref{Saving Buffers}.
248
249@item write-file-functions
250@xref{Saving Buffers}.
251 231
252@item write-region-annotate-functions
253@xref{Format Conversion}.
254@end table 232@end table
233
234@ignore
235Some -hook, -function, -functions from preloaded Lisp or C files that
236I thought did not need to be mentioned here:
237
238Lisp:
239after-load-functions
240auto-coding-functions
241choose-completion-string-functions
242completing-read-function
243completion-annotate-function
244completion-at-point-functions
245completion-in-region-functions
246completion-list-insert-choice-function
247describe-current-input-method-function
248filter-buffer-substring-functions
249font-lock-function
250inactivate-current-input-method-function
251menu-bar-select-buffer-function
252read-file-name-function
253replace-re-search-function
254replace-search-function
255yank-undo-function
256
257C hooks:
258kbd-macro-termination-hook
259signal-hook-function
260
261C functions:
262redisplay-end-trigger-functions
263x-lost-selection-functions
264x-sent-selection-functions
265
266C function:
267auto-composition-function
268auto-fill-function
269command-error-function
270compose-chars-after-function
271composition-function-table
272deferred-action-function
273input-method-function
274load-read-function
275load-source-file-function
276macro-declaration-function
277read-buffer-function
278ring-bell-function
279select-safe-coding-system-function
280set-auto-coding-function
281show-help-function
282signal-hook-function
283undo-outer-limit-function
284
285@end ignore
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index eac895b6279..b0e9d4a3139 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.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-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 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/modes 5@setfilename ../../info/modes
6@node Modes, Documentation, Keymaps, Top 6@node Modes, Documentation, Keymaps, Top
@@ -38,7 +38,7 @@ user. For related topics such as keymaps and syntax tables, see
38to be called on a particular occasion by an existing program. Emacs 38to be called on a particular occasion by an existing program. Emacs
39provides hooks for the sake of customization. Most often, hooks are set 39provides hooks for the sake of customization. Most often, hooks are set
40up in the init file (@pxref{Init File}), but Lisp programs can set them also. 40up in the init file (@pxref{Init File}), but Lisp programs can set them also.
41@xref{Standard Hooks}, for a list of standard hook variables. 41@xref{Standard Hooks}, for a list of some standard hook variables.
42 42
43@cindex normal hook 43@cindex normal hook
44 Most of the hooks in Emacs are @dfn{normal hooks}. These variables 44 Most of the hooks in Emacs are @dfn{normal hooks}. These variables
@@ -4030,8 +4030,3 @@ Here @var{desktop-buffer-misc} is the value returned by the function
4030optionally bound to @code{desktop-save-buffer}. 4030optionally bound to @code{desktop-save-buffer}.
4031@end defvar 4031@end defvar
4032 4032
4033@ignore
4034 Local Variables:
4035 fill-column: 72
4036 End:
4037@end ignore