New directory
[bpt/emacs.git] / lispref / hooks.texi
CommitLineData
89851a09
RS
1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual.
177c0ea7 3@c Copyright (C) 1990, 1991, 1992, 1993, 1998 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 9The following is a list of hook variables that let you provide
177c0ea7 10functions to be called from within Emacs on suitable occasions.
89851a09 11
5632e6b4
RS
12Most 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
14a hook is a list of functions; the functions are called with no
15arguments and their values are completely ignored. The recommended way
16to 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
dd73b091
RS
19The variables whose names end in @samp{-hooks} or @samp{-functions} are
20usually @dfn{abnormal hooks}; their values are lists of functions, but
21these functions are called in a special way (they are passed arguments,
22or their values are used). A few of these variables are actually normal
23hooks which were named before we established the convention that normal
24hooks' names should end in @samp{-hook}.
89851a09 25
dd73b091
RS
26The variables whose names end in @samp{-function} have single functions
27as their values. (In older Emacs versions, some of these variables had
28names ending in @samp{-hook} even though they were not normal hooks;
29however, we have renamed all of those.)
89851a09
RS
30
31@c !!! need xref to where each hook is documented or else document it
32@c by specifying what is expected, and when it is called relative to
a9f0a989 33@c mode initialization.
89851a09
RS
34
35@table @code
36@item activate-mark-hook
72654a3c 37@item after-change-functions
89851a09
RS
38@item after-init-hook
39@item after-insert-file-functions
fa00d3b6 40@item after-make-frame-functions
f9f59935
RS
41@item after-revert-hook
42@item after-save-hook
42703598 43@item apropos-mode-hook
89851a09
RS
44@item auto-fill-function
45@item auto-save-hook
72654a3c 46@item before-change-functions
89851a09
RS
47@item before-init-hook
48@item before-make-frame-hook
f9f59935 49@item before-revert-hook
89851a09 50@item blink-paren-function
f9f59935 51@item buffer-access-fontify-functions
89851a09
RS
52@item c-mode-hook
53@item calendar-load-hook
f9f59935 54@item change-major-mode-hook
89851a09 55@item command-history-hook
f9f59935 56@item command-line-functions
89851a09 57@item comment-indent-function
b26d003a 58@item custom-define-hook
89851a09
RS
59@item deactivate-mark-hook
60@item diary-display-hook
61@item diary-hook
62@item dired-mode-hook
63@item disabled-command-hook
f9f59935 64@item echo-area-clear-hook
89851a09
RS
65@item edit-picture-hook
66@item electric-buffer-menu-mode-hook
67@item electric-command-history-hook
68@item electric-help-mode-hook
69@item emacs-lisp-mode-hook
f2aa473a
SM
70@item find-file-hook
71@item find-file-not-found-functions
89851a09
RS
72@item first-change-hook
73@item fortran-comment-hook
74@item fortran-mode-hook
89851a09
RS
75@item indent-mim-hook
76@item initial-calendar-window-hook
42703598 77@item kbd-macro-termination-hook
f9f59935 78@item kill-buffer-hook
89851a09 79@item kill-buffer-query-functions
f9f59935 80@item kill-emacs-hook
89851a09
RS
81@item kill-emacs-query-functions
82@item LaTeX-mode-hook
83@item ledit-mode-hook
84@item lisp-indent-function
85@item lisp-interaction-mode-hook
86@item lisp-mode-hook
87@item list-diary-entries-hook
89851a09
RS
88@item mail-mode-hook
89@item mail-setup-hook
90@item mark-diary-entries-hook
91@item medit-mode-hook
f9f59935 92@item menu-bar-update-hook
89851a09 93@item minibuffer-setup-hook
72654a3c 94@item minibuffer-exit-hook
97dad108 95@item mouse-position-function
89851a09
RS
96@item news-mode-hook
97@item news-reply-mode-hook
98@item news-setup-hook
99@item nongregorian-diary-listing-hook
100@item nongregorian-diary-marking-hook
101@item nroff-mode-hook
102@item outline-mode-hook
103@item plain-TeX-mode-hook
104@item post-command-hook
105@item pre-abbrev-expand-hook
106@item pre-command-hook
107@item print-diary-entries-hook
108@item prolog-mode-hook
109@item protect-innocence-hook
f9f59935 110@item redisplay-end-trigger-functions
89851a09
RS
111@item rmail-edit-mode-hook
112@item rmail-mode-hook
113@item rmail-summary-mode-hook
114@item scheme-indent-hook
115@item scheme-mode-hook
116@item scribe-mode-hook
117@item shell-mode-hook
118@item shell-set-directory-error-hook
119@item suspend-hook
120@item suspend-resume-hook
121@item temp-buffer-show-function
122@item term-setup-hook
123@item terminal-mode-hook
124@item terminal-mode-break-hook
125@item TeX-mode-hook
126@item text-mode-hook
127@item today-visible-calendar-hook
128@item today-invisible-calendar-hook
129@item vi-mode-hook
130@item view-hook
f9f59935
RS
131@item window-configuration-change-hook
132@item window-scroll-functions
89851a09 133@item window-setup-hook
f9f59935 134@item window-size-change-functions
f2aa473a
SM
135@item write-contents-functions
136@item write-file-functions
bfe721d1 137@item write-region-annotate-functions
89851a09 138@end table