1994-03-20 18:24:30 +00:00
|
|
|
@c -*-texinfo-*-
|
|
|
|
@c This is part of the GNU Emacs Lisp Reference Manual.
|
2005-04-03 13:53:56 +00:00
|
|
|
@c Copyright (C) 1990, 1991, 1992, 1993, 1998, 2004, 2005 Free Software Foundation, Inc.
|
1994-03-20 18:24:30 +00:00
|
|
|
@c See the file elisp.texi for copying conditions.
|
|
|
|
@setfilename ../info/hooks
|
1995-06-06 19:21:15 +00:00
|
|
|
@node Standard Hooks, Index, Standard Keymaps, Top
|
1994-03-20 18:24:30 +00:00
|
|
|
@appendix Standard Hooks
|
|
|
|
|
1994-05-21 02:22:28 +00:00
|
|
|
The following is a list of hook variables that let you provide
|
2003-02-04 14:56:31 +00:00
|
|
|
functions to be called from within Emacs on suitable occasions.
|
1994-03-20 18:24:30 +00:00
|
|
|
|
1994-05-21 02:22:28 +00:00
|
|
|
Most of these variables have names ending with @samp{-hook}. They are
|
|
|
|
@dfn{normal hooks}, run by means of @code{run-hooks}. The value of such
|
1996-09-01 22:44:57 +00:00
|
|
|
a hook is a list of functions; the functions are called with no
|
|
|
|
arguments and their values are completely ignored. The recommended way
|
|
|
|
to put a new function on such a hook is to call @code{add-hook}.
|
|
|
|
@xref{Hooks}, for more information about using hooks.
|
1994-03-20 18:24:30 +00:00
|
|
|
|
2005-04-03 13:53:56 +00:00
|
|
|
Every major mode defines a mode hook named
|
|
|
|
@samp{@var{modename}-mode-hook}. The major mode command runs this
|
|
|
|
normal hook with @code{run-mode-hooks} as the very last thing it does.
|
2005-04-26 00:50:42 +00:00
|
|
|
@xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks
|
|
|
|
are omitted in the list below.
|
2005-04-03 13:53:56 +00:00
|
|
|
|
1996-09-01 22:44:57 +00:00
|
|
|
The variables whose names end in @samp{-hooks} or @samp{-functions} are
|
|
|
|
usually @dfn{abnormal hooks}; their values are lists of functions, but
|
|
|
|
these functions are called in a special way (they are passed arguments,
|
|
|
|
or their values are used). A few of these variables are actually normal
|
|
|
|
hooks which were named before we established the convention that normal
|
|
|
|
hooks' names should end in @samp{-hook}.
|
1994-03-20 18:24:30 +00:00
|
|
|
|
1996-09-01 22:44:57 +00:00
|
|
|
The variables whose names end in @samp{-function} have single functions
|
|
|
|
as their values. (In older Emacs versions, some of these variables had
|
|
|
|
names ending in @samp{-hook} even though they were not normal hooks;
|
|
|
|
however, we have renamed all of those.)
|
1994-03-20 18:24:30 +00:00
|
|
|
|
2005-04-03 13:53:56 +00:00
|
|
|
@c We need to xref to where each hook is documented or else document
|
|
|
|
@c it here.
|
1994-03-20 18:24:30 +00:00
|
|
|
|
|
|
|
@table @code
|
|
|
|
@item activate-mark-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{The Mark}.
|
|
|
|
|
1994-04-10 00:23:58 +00:00
|
|
|
@item after-change-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Change Hooks}.
|
|
|
|
|
2004-09-25 02:43:35 +00:00
|
|
|
@item after-change-major-mode-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Mode Hooks}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item after-init-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Init File}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item after-insert-file-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Properties}.
|
|
|
|
|
2000-10-17 22:48:39 +00:00
|
|
|
@item after-make-frame-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Creating Frames}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item after-revert-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Reverting}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item after-save-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Buffers}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item auto-fill-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Auto Filling}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item auto-save-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Auto-Saving}.
|
|
|
|
|
1994-04-10 00:23:58 +00:00
|
|
|
@item before-change-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Change Hooks}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item before-init-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Init File}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item before-make-frame-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Creating Frames}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item before-revert-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Reverting}.
|
|
|
|
|
2004-01-05 18:20:27 +00:00
|
|
|
@item before-save-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Buffers}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item blink-paren-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Blinking}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item buffer-access-fontify-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Lazy Properties}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item calendar-load-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Calendar Customizing,, emacs-xtra}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item change-major-mode-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Creating Buffer-Local}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item command-line-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Command-Line Arguments}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item comment-indent-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Options for Comments,, Options Controlling Comments, emacs, the
|
|
|
|
GNU Emacs Manual}.
|
|
|
|
|
2001-12-14 03:08:47 +00:00
|
|
|
@item custom-define-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
Hook called after defining each customize option.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item deactivate-mark-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{The Mark}.
|
|
|
|
|
2004-05-07 18:03:36 +00:00
|
|
|
@item desktop-after-read-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
Normal hook run after a successful @code{desktop-read}. May be used
|
|
|
|
to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs
|
|
|
|
Sessions, emacs, the GNU Emacs Manual}.
|
|
|
|
|
2004-05-07 18:03:36 +00:00
|
|
|
@item desktop-no-desktop-file-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
Normal hook run when @code{desktop-read} can't find a desktop file.
|
|
|
|
May be used to show a dired buffer. @xref{Saving Emacs Sessions,,
|
|
|
|
Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
|
|
|
|
|
2004-05-07 18:03:36 +00:00
|
|
|
@item desktop-save-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
Normal hook run before the desktop is saved in a desktop file. This
|
|
|
|
is useful for truncating history lists, for example. @xref{Saving
|
|
|
|
Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item diary-display-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Fancy Diary Display,, emacs-xtra}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item diary-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
List of functions called after the display of the diary. Can be used
|
|
|
|
for appointment notification.
|
|
|
|
|
2004-08-08 15:49:14 +00:00
|
|
|
@item disabled-command-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Disabling Commands}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item echo-area-clear-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{The Echo Area}.
|
|
|
|
|
|
|
|
@item emacs-startup-hook
|
|
|
|
@xref{Init File}.
|
|
|
|
|
2002-06-23 22:15:43 +00:00
|
|
|
@item find-file-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Visiting Functions}.
|
|
|
|
|
2002-06-23 22:15:43 +00:00
|
|
|
@item find-file-not-found-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Visiting Functions}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item first-change-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Change Hooks}.
|
|
|
|
|
2005-04-28 11:35:02 +00:00
|
|
|
@item font-lock-beginning-of-syntax-function
|
|
|
|
@xref{Syntactic Font Lock}.
|
|
|
|
|
|
|
|
@item font-lock-fontify-buffer-function
|
|
|
|
@xref{Other Font Lock Variables}.
|
|
|
|
|
|
|
|
@item font-lock-fontify-region-function
|
|
|
|
@xref{Other Font Lock Variables}.
|
|
|
|
|
|
|
|
@item font-lock-mark-block-function
|
|
|
|
@xref{Other Font Lock Variables}.
|
|
|
|
|
|
|
|
@item font-lock-syntactic-face-function
|
|
|
|
@xref{Syntactic Font Lock}.
|
|
|
|
|
|
|
|
@item font-lock-unfontify-buffer-function
|
|
|
|
@xref{Other Font Lock Variables}.
|
|
|
|
|
|
|
|
@item font-lock-unfontify-region-function
|
|
|
|
@xref{Other Font Lock Variables}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item initial-calendar-window-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Calendar Customizing,, emacs-xtra}.
|
|
|
|
|
2001-09-08 17:51:48 +00:00
|
|
|
@item kbd-macro-termination-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Keyboard Macros}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item kill-buffer-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Killing Buffers}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item kill-buffer-query-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Killing Buffers}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item kill-emacs-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Killing Emacs}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item kill-emacs-query-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Killing Emacs}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item lisp-indent-function
|
2005-04-03 13:53:56 +00:00
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item list-diary-entries-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Fancy Diary Display,, emacs-xtra}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item mail-setup-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs
|
|
|
|
Manual}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item mark-diary-entries-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Fancy Diary Display,, emacs-xtra}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item menu-bar-update-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Menu Bar}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item minibuffer-setup-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Minibuffer Misc}.
|
|
|
|
|
1994-04-10 00:23:58 +00:00
|
|
|
@item minibuffer-exit-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Minibuffer Misc}.
|
|
|
|
|
2000-12-06 20:49:59 +00:00
|
|
|
@item mouse-position-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Mouse Position}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item nongregorian-diary-listing-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item nongregorian-diary-marking-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item post-command-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Command Overview}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item pre-abbrev-expand-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Abbrev Expansion}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item pre-command-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Command Overview}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item print-diary-entries-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Diary Customizing,, emacs-xtra}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item redisplay-end-trigger-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Window Hooks}.
|
|
|
|
|
|
|
|
@item scheme-indent-function
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item suspend-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Suspending Emacs}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item suspend-resume-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Suspending Emacs}.
|
|
|
|
|
|
|
|
@item temp-buffer-setup-hook
|
|
|
|
@xref{Temporary Displays}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item temp-buffer-show-function
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Temporary Displays}.
|
|
|
|
|
|
|
|
@item temp-buffer-show-hook
|
|
|
|
@xref{Temporary Displays}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item term-setup-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Terminal-Specific}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item today-visible-calendar-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Calendar Customizing,, emacs-xtra}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item today-invisible-calendar-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@inforef{Calendar Customizing,, emacs-xtra}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item window-configuration-change-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Window Hooks}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item window-scroll-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Window Hooks}.
|
|
|
|
|
1994-03-20 18:24:30 +00:00
|
|
|
@item window-setup-hook
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Window Systems}.
|
|
|
|
|
1998-02-28 01:53:53 +00:00
|
|
|
@item window-size-change-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Window Hooks}.
|
|
|
|
|
2002-06-23 22:15:43 +00:00
|
|
|
@item write-contents-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Buffers}.
|
|
|
|
|
2002-06-23 22:15:43 +00:00
|
|
|
@item write-file-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Buffers}.
|
|
|
|
|
1995-06-06 19:21:15 +00:00
|
|
|
@item write-region-annotate-functions
|
2005-04-03 13:53:56 +00:00
|
|
|
@xref{Saving Properties}.
|
1994-03-20 18:24:30 +00:00
|
|
|
@end table
|
2003-09-01 15:45:59 +00:00
|
|
|
|
|
|
|
@ignore
|
|
|
|
arch-tag: 55fd0296-d906-4551-b300-979d3846aa88
|
|
|
|
@end ignore
|