Commit | Line | Data |
---|---|---|
89851a09 RS |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Emacs Lisp Reference Manual. | |
3 | @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. | |
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 |
89851a09 RS |
10 | functions to be called from within Emacs on suitable occasions. |
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 | |
dd73b091 RS |
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}. | |
89851a09 | 25 | |
dd73b091 RS |
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.) | |
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 | |
33 | @c mode initialization.) | |
34 | ||
35 | @table @code | |
36 | @item activate-mark-hook | |
37 | @item after-change-function | |
72654a3c | 38 | @item after-change-functions |
89851a09 RS |
39 | @item after-init-hook |
40 | @item after-insert-file-functions | |
41 | @item after-make-frame-hook | |
42 | @item auto-fill-function | |
43 | @item auto-save-hook | |
44 | @item before-change-function | |
72654a3c | 45 | @item before-change-functions |
89851a09 RS |
46 | @item before-init-hook |
47 | @item before-make-frame-hook | |
48 | @item blink-paren-function | |
49 | @item c-mode-hook | |
50 | @item calendar-load-hook | |
51 | @item command-history-hook | |
52 | @item comment-indent-function | |
53 | @item deactivate-mark-hook | |
54 | @item diary-display-hook | |
55 | @item diary-hook | |
56 | @item dired-mode-hook | |
57 | @item disabled-command-hook | |
58 | @item edit-picture-hook | |
59 | @item electric-buffer-menu-mode-hook | |
60 | @item electric-command-history-hook | |
61 | @item electric-help-mode-hook | |
62 | @item emacs-lisp-mode-hook | |
63 | @item find-file-hooks | |
64 | @item find-file-not-found-hooks | |
65 | @item first-change-hook | |
66 | @item fortran-comment-hook | |
67 | @item fortran-mode-hook | |
68 | @item ftp-setup-write-file-hooks | |
69 | @item ftp-write-file-hook | |
70 | @item indent-mim-hook | |
71 | @item initial-calendar-window-hook | |
72 | @item kill-buffer-query-functions | |
73 | @item kill-emacs-query-functions | |
74 | @item LaTeX-mode-hook | |
75 | @item ledit-mode-hook | |
76 | @item lisp-indent-function | |
77 | @item lisp-interaction-mode-hook | |
78 | @item lisp-mode-hook | |
79 | @item list-diary-entries-hook | |
80 | @item m2-mode-hook | |
81 | @item mail-mode-hook | |
82 | @item mail-setup-hook | |
83 | @item mark-diary-entries-hook | |
84 | @item medit-mode-hook | |
85 | @item mh-compose-letter-hook | |
86 | @item mh-folder-mode-hook | |
87 | @item mh-letter-mode-hook | |
88 | @item mim-mode-hook | |
89 | @item minibuffer-setup-hook | |
72654a3c | 90 | @item minibuffer-exit-hook |
89851a09 RS |
91 | @item news-mode-hook |
92 | @item news-reply-mode-hook | |
93 | @item news-setup-hook | |
94 | @item nongregorian-diary-listing-hook | |
95 | @item nongregorian-diary-marking-hook | |
96 | @item nroff-mode-hook | |
97 | @item outline-mode-hook | |
98 | @item plain-TeX-mode-hook | |
99 | @item post-command-hook | |
100 | @item pre-abbrev-expand-hook | |
101 | @item pre-command-hook | |
102 | @item print-diary-entries-hook | |
103 | @item prolog-mode-hook | |
104 | @item protect-innocence-hook | |
105 | @item rmail-edit-mode-hook | |
106 | @item rmail-mode-hook | |
107 | @item rmail-summary-mode-hook | |
108 | @item scheme-indent-hook | |
109 | @item scheme-mode-hook | |
110 | @item scribe-mode-hook | |
111 | @item shell-mode-hook | |
112 | @item shell-set-directory-error-hook | |
113 | @item suspend-hook | |
114 | @item suspend-resume-hook | |
115 | @item temp-buffer-show-function | |
116 | @item term-setup-hook | |
117 | @item terminal-mode-hook | |
118 | @item terminal-mode-break-hook | |
119 | @item TeX-mode-hook | |
120 | @item text-mode-hook | |
121 | @item today-visible-calendar-hook | |
122 | @item today-invisible-calendar-hook | |
123 | @item vi-mode-hook | |
124 | @item view-hook | |
125 | @item window-setup-hook | |
126 | @item write-contents-hooks | |
127 | @item write-file-hooks | |
bfe721d1 | 128 | @item write-region-annotate-functions |
89851a09 | 129 | @end table |