*** empty log message ***
[emacs.git] / lispref / hooks.texi
blobe68c1fd53dbabf0021e835212ff726ab033422b6
1 @c -*-texinfo-*-
2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1998 Free Software Foundation, Inc. 
4 @c See the file elisp.texi for copying conditions.
5 @setfilename ../info/hooks
6 @node Standard Hooks, Index, Standard Keymaps, Top
7 @appendix Standard Hooks
9 The following is a list of hook variables that let you provide
10 functions to be called from within Emacs on suitable occasions. 
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
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.
19 The variables whose names end in @samp{-hooks} or @samp{-functions} are
20 usually @dfn{abnormal hooks}; their values are lists of functions, but
21 these functions are called in a special way (they are passed arguments,
22 or their values are used).  A few of these variables are actually normal
23 hooks which were named before we established the convention that normal
24 hooks' names should end in @samp{-hook}.
26 The variables whose names end in @samp{-function} have single functions
27 as their values.  (In older Emacs versions, some of these variables had
28 names ending in @samp{-hook} even though they were not normal hooks;
29 however, we have renamed all of those.)
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
33 @c mode initialization.
35 @table @code
36 @item activate-mark-hook
37 @item after-change-functions
38 @item after-init-hook
39 @item after-insert-file-functions
40 @item after-make-frame-functions
41 @item after-revert-hook
42 @item after-save-hook
43 @item apropos-mode-hook
44 @item auto-fill-function
45 @item auto-save-hook
46 @item before-change-functions
47 @item before-init-hook
48 @item before-make-frame-hook
49 @item before-revert-hook
50 @item blink-paren-function
51 @item buffer-access-fontify-functions
52 @item c-mode-hook
53 @item calendar-load-hook
54 @item change-major-mode-hook
55 @item command-history-hook
56 @item command-line-functions
57 @item comment-indent-function
58 @item deactivate-mark-hook
59 @item diary-display-hook
60 @item diary-hook
61 @item dired-mode-hook
62 @item disabled-command-hook
63 @item echo-area-clear-hook
64 @item edit-picture-hook
65 @item electric-buffer-menu-mode-hook
66 @item electric-command-history-hook
67 @item electric-help-mode-hook
68 @item emacs-lisp-mode-hook
69 @item find-file-hooks
70 @item find-file-not-found-hooks
71 @item first-change-hook
72 @item fortran-comment-hook
73 @item fortran-mode-hook
74 @item indent-mim-hook
75 @item initial-calendar-window-hook
76 @item kbd-macro-termination-hook
77 @item kill-buffer-hook
78 @item kill-buffer-query-functions
79 @item kill-emacs-hook
80 @item kill-emacs-query-functions
81 @item LaTeX-mode-hook
82 @item ledit-mode-hook
83 @item lisp-indent-function
84 @item lisp-interaction-mode-hook
85 @item lisp-mode-hook
86 @item list-diary-entries-hook
87 @item local-write-file-hooks
88 @item mail-mode-hook
89 @item mail-setup-hook
90 @item mark-diary-entries-hook
91 @item medit-mode-hook
92 @item menu-bar-update-hook
93 @item minibuffer-setup-hook
94 @item minibuffer-exit-hook
95 @item mouse-position-function
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
110 @item redisplay-end-trigger-functions
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
131 @item window-configuration-change-hook
132 @item window-scroll-functions
133 @item window-setup-hook
134 @item window-size-change-functions
135 @item write-contents-hooks
136 @item write-file-hooks
137 @item write-region-annotate-functions
138 @end table