Mercurial > emacs
annotate lispref/hooks.texi @ 59700:c401b93db575
* window.c (Fpos_visible_in_window_p): Simplify return value for
partially visible rows.
(window_scroll_pixel_based): Adapt to that change.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 23 Jan 2005 13:13:03 +0000 |
parents | 6afcc5331733 |
children | 98aa85818778 0b158db81c28 |
rev | line source |
---|---|
6440 | 1 @c -*-texinfo-*- |
2 @c This is part of the GNU Emacs Lisp Reference Manual. | |
53505
780b9eb8b58e
hooks.texi (Standard Hooks): Add before-save-hook.
Simon Josefsson <jas@extundo.com>
parents:
52401
diff
changeset
|
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2004 Free Software Foundation, Inc. |
6440 | 4 @c See the file elisp.texi for copying conditions. |
5 @setfilename ../info/hooks | |
12098 | 6 @node Standard Hooks, Index, Standard Keymaps, Top |
6440 | 7 @appendix Standard Hooks |
8 | |
7600 | 9 The following is a list of hook variables that let you provide |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45979
diff
changeset
|
10 functions to be called from within Emacs on suitable occasions. |
6440 | 11 |
7600 | 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 | |
16056
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
14 a hook is a list of functions; the functions are called with no |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
15 arguments and their values are completely ignored. The recommended way |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
16 to put a new function on such a hook is to call @code{add-hook}. |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
17 @xref{Hooks}, for more information about using hooks. |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
18 |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
19 The variables whose names end in @samp{-hooks} or @samp{-functions} are |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
20 usually @dfn{abnormal hooks}; their values are lists of functions, but |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
21 these functions are called in a special way (they are passed arguments, |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
22 or their values are used). A few of these variables are actually normal |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
23 hooks which were named before we established the convention that normal |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
24 hooks' names should end in @samp{-hook}. |
6440 | 25 |
26 The variables whose names end in @samp{-function} have single functions | |
16056
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
27 as their values. (In older Emacs versions, some of these variables had |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
28 names ending in @samp{-hook} even though they were not normal hooks; |
bfe1d6597f08
Explain better about abnormal hooks.
Richard M. Stallman <rms@gnu.org>
parents:
12098
diff
changeset
|
29 however, we have renamed all of those.) |
6440 | 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 | |
22138
d4ac295a98b3
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
21007
diff
changeset
|
33 @c mode initialization. |
6440 | 34 |
35 @table @code | |
36 @item activate-mark-hook | |
6782
5b07647ec8f7
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6440
diff
changeset
|
37 @item after-change-functions |
57217
6afcc5331733
(Standard Hooks): Add `after-change-major-mode-hook'.
Luc Teirlinck <teirllm@auburn.edu>
parents:
56622
diff
changeset
|
38 @item after-change-major-mode-hook |
6440 | 39 @item after-init-hook |
40 @item after-insert-file-functions | |
32597
df31899ab320
Missed this file in previous commit.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
22138
diff
changeset
|
41 @item after-make-frame-functions |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
42 @item after-revert-hook |
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
43 @item after-save-hook |
39209
a0a6a6a2092f
(Standard Hooks): Add kbd-macro-termination-hook and apropos-mode-hook.
Eli Zaretskii <eliz@gnu.org>
parents:
34306
diff
changeset
|
44 @item apropos-mode-hook |
6440 | 45 @item auto-fill-function |
46 @item auto-save-hook | |
6782
5b07647ec8f7
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6440
diff
changeset
|
47 @item before-change-functions |
6440 | 48 @item before-init-hook |
49 @item before-make-frame-hook | |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
50 @item before-revert-hook |
53505
780b9eb8b58e
hooks.texi (Standard Hooks): Add before-save-hook.
Simon Josefsson <jas@extundo.com>
parents:
52401
diff
changeset
|
51 @item before-save-hook |
6440 | 52 @item blink-paren-function |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
53 @item buffer-access-fontify-functions |
6440 | 54 @item c-mode-hook |
55 @item calendar-load-hook | |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
56 @item change-major-mode-hook |
6440 | 57 @item command-history-hook |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
58 @item command-line-functions |
6440 | 59 @item comment-indent-function |
42016
3900be0515b0
Add custom-define-hook.
Richard M. Stallman <rms@gnu.org>
parents:
39209
diff
changeset
|
60 @item custom-define-hook |
6440 | 61 @item deactivate-mark-hook |
55416
b736c6cf17ee
Add desktop-after-read-hook, desktop-no-desktop-file-hook and desktop-save-hook.
Lars Hansen <larsh@soem.dk>
parents:
53505
diff
changeset
|
62 @item desktop-after-read-hook |
b736c6cf17ee
Add desktop-after-read-hook, desktop-no-desktop-file-hook and desktop-save-hook.
Lars Hansen <larsh@soem.dk>
parents:
53505
diff
changeset
|
63 @item desktop-no-desktop-file-hook |
b736c6cf17ee
Add desktop-after-read-hook, desktop-no-desktop-file-hook and desktop-save-hook.
Lars Hansen <larsh@soem.dk>
parents:
53505
diff
changeset
|
64 @item desktop-save-hook |
6440 | 65 @item diary-display-hook |
66 @item diary-hook | |
67 @item dired-mode-hook | |
56622
46ea95c2b12c
(Standard Hooks): `disabled-command-hook' has been renamed to
Luc Teirlinck <teirllm@auburn.edu>
parents:
55416
diff
changeset
|
68 @item disabled-command-function |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
69 @item echo-area-clear-hook |
6440 | 70 @item edit-picture-hook |
71 @item electric-buffer-menu-mode-hook | |
72 @item electric-command-history-hook | |
73 @item electric-help-mode-hook | |
74 @item emacs-lisp-mode-hook | |
45979
87962bf716e3
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
42016
diff
changeset
|
75 @item find-file-hook |
87962bf716e3
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
42016
diff
changeset
|
76 @item find-file-not-found-functions |
6440 | 77 @item first-change-hook |
78 @item fortran-comment-hook | |
79 @item fortran-mode-hook | |
80 @item indent-mim-hook | |
81 @item initial-calendar-window-hook | |
39209
a0a6a6a2092f
(Standard Hooks): Add kbd-macro-termination-hook and apropos-mode-hook.
Eli Zaretskii <eliz@gnu.org>
parents:
34306
diff
changeset
|
82 @item kbd-macro-termination-hook |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
83 @item kill-buffer-hook |
6440 | 84 @item kill-buffer-query-functions |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
85 @item kill-emacs-hook |
6440 | 86 @item kill-emacs-query-functions |
87 @item LaTeX-mode-hook | |
88 @item ledit-mode-hook | |
89 @item lisp-indent-function | |
90 @item lisp-interaction-mode-hook | |
91 @item lisp-mode-hook | |
92 @item list-diary-entries-hook | |
93 @item mail-mode-hook | |
94 @item mail-setup-hook | |
95 @item mark-diary-entries-hook | |
96 @item medit-mode-hook | |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
97 @item menu-bar-update-hook |
6440 | 98 @item minibuffer-setup-hook |
6782
5b07647ec8f7
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
6440
diff
changeset
|
99 @item minibuffer-exit-hook |
34306
de5c0dfaf459
Zap before-change-function, ftp-setup-write-file-hooks,
Dave Love <fx@gnu.org>
parents:
32597
diff
changeset
|
100 @item mouse-position-function |
6440 | 101 @item news-mode-hook |
102 @item news-reply-mode-hook | |
103 @item news-setup-hook | |
104 @item nongregorian-diary-listing-hook | |
105 @item nongregorian-diary-marking-hook | |
106 @item nroff-mode-hook | |
107 @item outline-mode-hook | |
108 @item plain-TeX-mode-hook | |
109 @item post-command-hook | |
110 @item pre-abbrev-expand-hook | |
111 @item pre-command-hook | |
112 @item print-diary-entries-hook | |
113 @item prolog-mode-hook | |
114 @item protect-innocence-hook | |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
115 @item redisplay-end-trigger-functions |
6440 | 116 @item rmail-edit-mode-hook |
117 @item rmail-mode-hook | |
118 @item rmail-summary-mode-hook | |
119 @item scheme-indent-hook | |
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 | |
125 @item suspend-resume-hook | |
126 @item temp-buffer-show-function | |
127 @item term-setup-hook | |
128 @item terminal-mode-hook | |
129 @item terminal-mode-break-hook | |
130 @item TeX-mode-hook | |
131 @item text-mode-hook | |
132 @item today-visible-calendar-hook | |
133 @item today-invisible-calendar-hook | |
134 @item vi-mode-hook | |
135 @item view-hook | |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
136 @item window-configuration-change-hook |
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
137 @item window-scroll-functions |
6440 | 138 @item window-setup-hook |
21007
66d807bdc5b4
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
16056
diff
changeset
|
139 @item window-size-change-functions |
45979
87962bf716e3
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
42016
diff
changeset
|
140 @item write-contents-functions |
87962bf716e3
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
42016
diff
changeset
|
141 @item write-file-functions |
12098 | 142 @item write-region-annotate-functions |
6440 | 143 @end table |
52401 | 144 |
145 @ignore | |
146 arch-tag: 55fd0296-d906-4551-b300-979d3846aa88 | |
147 @end ignore |