1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/doc/lispref/hooks.texi
Stefan Kangas 739e3dbe05 Remove many items obsolete since 24.1
* lisp/allout.el (allout-abbreviate-flattened-numbering)
(allout-mode-deactivate-hook):
* lisp/ansi-color.el (ansi-color-unfontify-region):
* lisp/auth-source.el (auth-source-hide-passwords)
(auth-source-user-or-password)
(auth-source-forget-user-or-password):
* lisp/cedet/data-debug.el (data-debug-map):
* lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table)
(semantic-grammar-map):
* lisp/chistory.el (command-history-map):
* lisp/comint.el (comint-dynamic-complete)
(comint-dynamic-complete-as-filename)
(comint-dynamic-simple-complete):
* lisp/dired-x.el (read-filename-at-point)
(dired-x-submit-report):
* lisp/dos-fns.el (register-name-alist, make-register)
(register-value, set-register-value, intdos, mode25, mode4350):
* lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle):
* lisp/emacs-lisp/chart.el (chart-map):
* lisp/emacs-lisp/package.el (package-menu-view-commentary):
* lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting):
* lisp/erc/erc.el (erc-complete-word):
* lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/files.el (inhibit-first-line-modes-regexps)
(inhibit-first-line-modes-suffixes):
* lisp/gnus/gnus-msg.el (gnus-outgoing-message-group)
(gnus-debug-files, gnus-debug-exclude-variables):
* lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M):
* lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal):
* lisp/gnus/nnimap.el (nnimap-split-rule):
* lisp/iimage.el (turn-on-iimage-mode):
* lisp/image.el (image-extension-data, image-library-alist):
* lisp/mail/emacsbug.el (report-emacs-bug-pretest-address):
* lisp/mail/mail-utils.el (rmail-dont-reply-to):
* lisp/mail/mailalias.el (mail-complete-function)
(mail-completion-at-point-function):
* lisp/mail/rmail.el (rmail-dont-reply-to-names)
(rmail-default-dont-reply-to-names):
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line)
(mail-sent-via):
* lisp/menu-bar.el (menu-bar-kill-ring-save):
* lisp/minibuffer.el (completion-annotate-function)
(minibuffer-local-filename-must-match-map):
* lisp/msb.el (msb-after-load-hooks):
* lisp/obsolete/eieio-compat.el (eieio-defmethod)
(eieio-defgeneric):
* lisp/obsolete/info-edit.el (Info-edit-map):
* lisp/obsolete/starttls.el (starttls-any-program-available):
* lisp/progmodes/cfengine.el (cfengine-mode-abbrevs):
* lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
* lisp/progmodes/make-mode.el (makefile-complete):
* lisp/progmodes/meta-mode.el (meta-complete-symbol)
(meta-mode-map):
* lisp/progmodes/pascal.el (pascal-toggle-completions)
(pascal-last-completions, pascal-show-completions):
* lisp/progmodes/prolog.el (prolog-char-quote-workaround):
* lisp/progmodes/which-func.el (which-func-mode): [FUNCTION]
* lisp/simple.el (count-lines-region, minibuffer-completing-symbol):
* lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map):
* lisp/strokes.el (strokes-report-bug):
* lisp/subr.el (condition-case-no-debug):
* lisp/term/ns-win.el (ns-alternatives-map)
(ns-store-cut-buffer-internal):
* lisp/term/w32-win.el (w32-default-color-map):
* lisp/term/x-win.el (x-cut-buffer-or-selection-value):
* lisp/textmodes/bibtex.el (bibtex-complete)
(bibtex-entry-field-alist):
* lisp/textmodes/reftex-index.el (reftex-index-map)
(reftex-index-phrases-map):
* lisp/textmodes/reftex-sel.el (reftex-select-label-map)
(reftex-select-bib-map):
* lisp/textmodes/reftex-toc.el (reftex-toc-map):
* lisp/textmodes/rst.el (rst-block-face, rst-external-face)
(rst-definition-face, rst-directive-face, rst-comment-face)
(rst-emphasis1-face, rst-emphasis2-face, rst-literal-face)
(rst-reference-face):
* lisp/vc/vc-hooks.el (vc-toggle-read-only):
* lisp/view.el (view-return-to-alist)
(view-return-to-alist-update): Remove many functions and variables
obsolete since 24.1.

* lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above
removed variable 'bibtex-entry-field-alist'.
* lisp/cedet/data-debug.el (data-debug-edebug-expr)
(data-debug-eval-expression):
* lisp/emacs-lisp/trace.el (trace--read-args):
* lisp/files-x.el (read-file-local-variable-value):
* lisp/simple.el (read--expression): Don't use above removed variable
'minibuffer-completing-symbol'.
* lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above
removed variables.
* src/w32fns.c (Fw32_default_color_map): Delete obsolete function.
(syms_of_w32fns): Delete defsubr for above defun.
* src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list>
<Vdeferred_action_function>: Delete DEFVARs.
<Qdeferred_action_function>: Delete DEFSYM.
(syms_of_keyboard_for_pdumper): Adjust for above change.
(command_loop_1): Don't run deferred-action-function hook.
* lisp/subr.el (deferred-action-list, deferred-action-function):
Delete obsoletion statements.
* lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run
'deferred-action-list' hook.
* doc/lispref/hooks.texi (Standard Hooks): Delete
'deferred-action-function'.

* lisp/emacs-lisp/lisp.el (field-complete):
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc):
* lisp/gnus/nnmail.el (nnmail-fancy-expiry-target):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/sendmail.el (sendmail-send-it):
* lisp/mail/smtpmail.el (smtpmail-send-it):
* lisp/minibuffer.el (minibuffer-completion-help):
* lisp/progmodes/python.el: Don't use above removed items.
* lisp/emacs-lisp/eieio-core.el:
* lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer
to above removed items.
; * etc/NEWS: List removed items.
2022-07-08 14:10:38 +02:00

304 lines
8.3 KiB
Text

@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990--1993, 1998, 2001--2022 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Standard Hooks
@appendix Standard Hooks
@cindex standard hooks
@cindex hook variables, list of
The following is a list of some hook variables that let you provide
functions to be called from within Emacs on suitable occasions.
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
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.
The variables whose names end in @samp{-functions} are usually
@dfn{abnormal hooks} (some old code may also use the deprecated
@samp{-hooks} suffix). Their values are lists of functions, but these
functions are called in a special way: they are either passed
arguments, or their return values are used in some way. The variables
whose names end in @samp{-function} have single functions as their
values.
This is not an exhaustive list, it only covers the more general hooks.
For example, every major mode defines a 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.
@xref{Mode Hooks}. Most minor modes have mode hooks too.
A special feature allows you to specify expressions to evaluate if and
when a file is loaded (@pxref{Hooks for Loading}). That feature is
not exactly a hook, but does a similar job.
@c We need to xref to where each hook is documented or else document it here.
@c Add vindex for anything not indexed elsewhere.
@c This list is in alphabetical order, grouped by topic.
@c TODO It should probably be more thoroughly ordered by topic.
@table @code
@item activate-mark-hook
@itemx deactivate-mark-hook
@xref{The Mark}.
@item after-change-functions
@itemx before-change-functions
@itemx first-change-hook
@xref{Change Hooks}.
@item after-change-major-mode-hook
@itemx change-major-mode-after-body-hook
@xref{Mode Hooks}.
@item after-init-hook
@itemx before-init-hook
@itemx emacs-startup-hook
@itemx window-setup-hook
@xref{Init File}.
@item after-insert-file-functions
@itemx write-region-annotate-functions
@itemx write-region-post-annotation-function
@xref{Format Conversion}.
@item after-make-frame-functions
@itemx before-make-frame-hook
@itemx server-after-make-frame-hook
@xref{Creating Frames}.
@c Not general enough?
@ignore
@item after-revert-hook
@itemx before-revert-hook
@itemx buffer-stale-function
@itemx revert-buffer-function
@itemx revert-buffer-insert-file-contents-function
@xref{Reverting}.
@end ignore
@item after-save-hook
@itemx before-save-hook
@itemx write-contents-functions
@itemx write-file-functions
@xref{Saving Buffers}.
@item after-setting-font-hook
@vindex after-setting-font-hook
Hook run after a frame's font changes.
@item auto-save-hook
@xref{Auto-Saving}.
@item before-hack-local-variables-hook
@itemx hack-local-variables-hook
@xref{File Local Variables}.
@item buffer-access-fontify-functions
@xref{Lazy Properties}.
@item buffer-list-update-hook
@vindex buffer-list-update-hook
Hook run when the buffer list changes (@pxref{Buffer List}).
@item buffer-quit-function
@vindex buffer-quit-function
Function to call to quit the current buffer.
@item change-major-mode-hook
@xref{Creating Buffer-Local}.
@item comint-password-function
This abnormal hook permits a derived mode to supply a password for the
underlying command interpreter without prompting the user.
@item command-line-functions
@xref{Command-Line Arguments}.
@item delayed-warnings-hook
@vindex delayed-warnings-hook
The command loop runs this soon after @code{post-command-hook} (q.v.).
@item focus-in-hook
@vindex focus-in-hook
@itemx focus-out-hook
@vindex focus-out-hook
@xref{Input Focus}.
@item delete-frame-functions
@itemx after-delete-frame-functions
@xref{Deleting Frames}.
@item delete-terminal-functions
@xref{Multiple Terminals}.
@item pop-up-frame-function
@itemx split-window-preferred-function
@xref{Choosing Window Options}.
@item echo-area-clear-hook
@xref{Echo Area Customization}.
@item find-file-hook
@itemx find-file-not-found-functions
@xref{Visiting Functions}.
@item font-lock-extend-after-change-region-function
@xref{Region to Refontify}.
@item font-lock-extend-region-functions
@xref{Multiline Font Lock}.
@item font-lock-fontify-buffer-function
@itemx font-lock-fontify-region-function
@itemx font-lock-mark-block-function
@itemx font-lock-unfontify-buffer-function
@itemx font-lock-unfontify-region-function
@xref{Other Font Lock Variables}.
@item fontification-functions
@xref{Auto Faces,, Automatic Face Assignment}.
@item frame-auto-hide-function
@xref{Quitting Windows}.
@item quit-window-hook
@xref{Quitting Windows}.
@item kill-buffer-hook
@itemx kill-buffer-query-functions
@xref{Killing Buffers}.
@item kill-emacs-hook
@itemx kill-emacs-query-functions
@xref{Killing Emacs}.
@item menu-bar-update-hook
@xref{Menu Bar}.
@item minibuffer-setup-hook
@itemx minibuffer-exit-hook
@xref{Minibuffer Misc}.
@item mouse-leave-buffer-hook
@vindex mouse-leave-buffer-hook
Hook run when the user mouse-clicks in a window.
@item mouse-position-function
@xref{Mouse Position}.
@item prefix-command-echo-keystrokes-functions
@vindex prefix-command-echo-keystrokes-functions
An abnormal hook run by prefix commands (such as @kbd{C-u}) which
should return a string describing the current prefix state. For
example, @kbd{C-u} produces @samp{C-u-} and @samp{C-u 1 2 3-}. Each
hook function is called with no arguments and should return a string
describing the current prefix state, or @code{nil} if there's no
prefix state. @xref{Prefix Command Arguments}.
@item prefix-command-preserve-state-hook
@vindex prefix-command-preserve-state-hook
Hook run when a prefix command needs to preserve the prefix by passing
the current prefix command state to the next command. For example,
@kbd{C-u} needs to pass the state to the next command when the user
types @kbd{C-u -} or follows @kbd{C-u} with a digit.
@item pre-redisplay-functions
Hook run in each window just before redisplaying it. @xref{Forcing
Redisplay}.
@item post-command-hook
@itemx pre-command-hook
@xref{Command Overview}.
@item post-gc-hook
@xref{Garbage Collection}.
@item post-self-insert-hook
@xref{Keymaps and Minor Modes}.
@ignore
@item prog-mode-hook
@itemx special-mode-hook
@vindex special-mode-hook
@xref{Basic Major Modes}.
@end ignore
@item suspend-hook
@itemx suspend-resume-hook
@itemx suspend-tty-functions
@itemx resume-tty-functions
@xref{Suspending Emacs}.
@item syntax-begin-function
@itemx syntax-propertize-extend-region-functions
@itemx syntax-propertize-function
@itemx font-lock-syntactic-face-function
@xref{Syntactic Font Lock}. @xref{Syntax Properties}.
@item temp-buffer-setup-hook
@itemx temp-buffer-show-function
@itemx temp-buffer-show-hook
@xref{Temporary Displays}.
@item tty-setup-hook
@xref{Terminal-Specific}.
@item window-configuration-change-hook
@itemx window-scroll-functions
@itemx window-size-change-functions
@xref{Window Hooks}.
@end table
@ignore
Some -hook, -function, -functions from preloaded Lisp or C files that
I thought did not need to be mentioned here:
Lisp:
after-load-functions
after-set-visited-file-name-hook
auto-coding-functions
choose-completion-string-functions
completing-read-function
completion-at-point-functions
completion-list-insert-choice-function
deactivate-current-input-method-function
describe-current-input-method-function
font-lock-function
menu-bar-select-buffer-function
read-file-name-function
replace-re-search-function
replace-search-function
yank-undo-function
C hooks:
kbd-macro-termination-hook
signal-hook-function
C functions:
redisplay-end-trigger-functions
x-lost-selection-functions
x-sent-selection-functions
C function:
auto-composition-function
auto-fill-function
command-error-function
compose-chars-after-function
composition-function-table
input-method-function
load-read-function
load-source-file-function
read-buffer-function
ring-bell-function
select-safe-coding-system-function
set-auto-coding-function
show-help-function
signal-hook-function
undo-outer-limit-function
@end ignore