List of Emacs Hooks
How to Find Hook
Most major modes have a Hook .
If a mode's name is “xx-mode”, its hook by convention is named “xx-mode-hook”.
First, be sure you load the mode first. Some hook many not show when the mode isn't loaded or initialized.
To load a mode, just e.g. Alt+x js-mode
To find a mode's hook, just search variable with the name “-hook” in it, or search the name of the mode. [see Emacs: Show Variable Value, List Variables]
Note: A major mode may have more than 1 hook.
How to List Emacs Hooks
Alt+x apropos-variable
then type “hook”.
Here's a complete list of emacs hook variables, as of Emacs 28 (Released 2022-04) , with no external packages loaded.
List of Emacs Hooks
- Buffer-menu-mode-hook
- Custom-mode-hook
- Info-mode-hook
- Info-selection-hook
- abbrev-mode-hook
- activate-mark-hook
- after-change-major-mode-hook
- after-init-hook
- after-revert-hook
- after-save-hook
- after-set-visited-file-name-hook
- after-setting-font-hook
- apropos-mode-hook
- authinfo-mode-hook
- auto-composition-mode-hook
- auto-compression-mode-hook
- auto-encryption-mode-hook
- auto-fill-mode-hook
- auto-lower-mode-hook
- auto-raise-mode-hook
- auto-revert-load-hook
- auto-revert-mode-hook
- auto-revert-tail-mode-hook
- auto-save-hook
- auto-save-mode-hook
- auto-save-visited-mode-hook
- awk-mode-hook
- before-hack-local-variables-hook
- before-init-hook
- before-make-frame-hook
- before-revert-hook
- before-save-hook
- binary-overwrite-mode-hook
- blink-cursor-mode-hook
- bookmark-after-jump-hook
- bookmark-bmenu-mode-hook
- bookmark-edit-annotation-mode-hook
- bookmark-exit-hook
- bookmark-load-hook
- browse-url-of-file-hook
- buffer-list-update-hook
- button-mode-hook
- c++-mode-hook
- c--unsafe-post-self-insert-hook-functions
- c-initialization-hook
- c-mode-common-hook
- c-mode-hook
- c-special-indent-hook
- change-major-mode-after-body-hook
- change-major-mode-hook
- cl-old-struct-compat-mode-hook
- clone-buffer-hook
- clone-indirect-buffer-hook
- column-number-mode-hook
- compilation-mode-hook
- compilation-start-hook
- completion-in-region-mode-hook
- completion-list-mode-hook
- completion-setup-hook
- context-menu-mode-hook
- cursor-intangible-mode-hook
- cursor-sensor-mode-hook
- custom-define-hook
- cvs-dired-use-hook
- deactivate-mark-hook
- delay-mode-hooks
- delayed-after-hook-functions
- delayed-mode-hooks
- delayed-warnings-hook
- delete-selection-mode-hook
- diff-auto-refine-mode-hook
- diff-minor-mode-hook
- diff-mode-hook
- dired-after-readin-hook
- dired-before-readin-hook
- dired-hide-details-mode-hook
- dired-initial-position-hook
- dired-isearch-filenames-mode-hook
- dired-load-hook
- dired-mode-hook
- dired-omit-mode-hook
- display-line-numbers-mode-hook
- echo-area-clear-hook
- edit-abbrevs-mode-hook
- eieio-hook
- eldoc-mode-hook
- electric-indent-local-mode-hook
- electric-indent-mode-hook
- electric-layout-local-mode-hook
- electric-layout-mode-hook
- electric-pair-local-mode-hook
- electric-pair-mode-hook
- electric-quote-local-mode-hook
- electric-quote-mode-hook
- elisp-byte-code-mode-hook
- emacs-lisp-compilation-mode-hook
- emacs-lisp-mode-hook
- emacs-startup-hook
- eval-expression-minibuffer-setup-hook
- exit-language-environment-hook
- fido-mode-hook
- fido-vertical-mode-hook
- file-name-shadow-mode-hook
- find-file-hook
- find-tag-hook
- first-change-hook
- focus-in-hook
- focus-out-hook
- font-lock-mode-hook
- global-auto-composition-mode-hook
- global-auto-revert-mode-hook
- global-display-line-numbers-mode-hook
- global-eldoc-mode-hook
- global-font-lock-mode-hook
- global-prettify-symbols-mode-hook
- global-visual-line-mode-hook
- global-xah-math-input-mode-hook
- grep-setup-hook
- hack-local-variables-hook
- horizontal-scroll-bar-mode-hook
- html-autoview-mode-hook
- html-mode-hook
- htmlize-after-hook
- htmlize-before-hook
- htmlize-file-hook
- icomplete-minibuffer-setup-hook
- icomplete-mode-hook
- icomplete-vertical-mode-hook
- idl-mode-hook
- ido-everywhere-hook
- ido-make-buffer-list-hook
- ido-make-dir-list-hook
- ido-make-file-list-hook
- ido-minibuffer-setup-hook
- ido-setup-hook
- image-minor-mode-hook
- imenu-after-jump-hook
- indent-tabs-mode-hook
- inhibit-modification-hooks
- inhibit-point-motion-hooks
- inhibit-startup-hooks
- input-method-activate-hook
- input-method-after-insert-chunk-hook
- input-method-deactivate-hook
- isearch-mode-end-hook
- isearch-mode-end-hook-quit
- isearch-mode-hook
- isearch-update-post-hook
- java-mode-hook
- jit-lock-debug-mode-hook
- js-jsx-mode-hook
- js-mode-hook
- kbd-macro-termination-hook
- kill-buffer-hook
- kill-emacs-hook
- line-number-mode-hook
- lisp-data-mode-hook
- lisp-interaction-mode-hook
- lisp-mode-hook
- lock-file-mode-hook
- mail-citation-hook
- mail-setup-hook
- menu-bar-mode-hook
- menu-bar-update-hook
- messages-buffer-mode-hook
- minibuffer-exit-hook
- minibuffer-inactive-mode-hook
- minibuffer-mode-hook
- minibuffer-setup-hook
- mouse-leave-buffer-hook
- mouse-wheel-mode-hook
- next-error-follow-minor-mode-hook
- next-error-hook
- normal-erase-is-backspace-mode-hook
- objc-mode-hook
- occur-edit-mode-hook
- occur-hook
- occur-mode-find-occurrence-hook
- occur-mode-hook
- overwrite-mode-hook
- package--post-download-archives-hook
- package-menu-mode-hook
- paragraph-indent-minor-mode-hook
- paragraph-indent-text-mode-hook
- pike-mode-hook
- post-command-hook
- post-gc-hook
- post-self-insert-hook
- pre-command-hook
- prefix-command-preserve-state-hook
- prettify-symbols-mode-hook
- process-menu-mode-hook
- prog-mode-hook
- quickurl-reread-hook-postfix
- quit-window-hook
- read-only-mode-hook
- recentf-dialog-mode-hook
- recentf-load-hook
- recentf-mode-hook
- recentf-used-hooks
- replace-update-post-hook
- rfn-eshadow-setup-minibuffer-hook
- rfn-eshadow-update-overlay-hook
- rmail-mode-hook
- rmail-show-message-hook
- save-place-local-mode-hook
- save-place-mode-hook
- savehist-mode-hook
- savehist-save-hook
- scroll-bar-mode-hook
- set-language-environment-hook
- sgml-electric-tag-pair-mode-hook
- sgml-mode-hook
- show-paren-local-mode-hook
- show-paren-mode-hook
- signal-hook-function
- size-indication-mode-hook
- special-mode-hook
- suspend-hook
- suspend-resume-hook
- tab-bar-history-mode-hook
- tab-bar-mode-hook
- tab-switcher-mode-hook
- tabulated-list-mode-hook
- tabulated-list-revert-hook
- temp-buffer-resize-mode-hook
- temp-buffer-setup-hook
- temp-buffer-show-hook
- temp-buffer-window-setup-hook
- temp-buffer-window-show-hook
- term-setup-hook
- text-mode-hook
- tool-bar-mode-hook
- tooltip-mode-hook
- transient-mark-mode-hook
- tty-setup-hook
- unify-8859-on-decoding-mode-hook
- unify-8859-on-encoding-mode-hook
- url-cookie-mode-hook
- url-handler-mode-hook
- url-load-hook
- use-hard-newlines-hook
- vc-before-checkin-hook
- vc-checkin-hook
- vc-checkout-hook
- vc-git-log-edit-mode-hook
- vc-git-log-view-mode-hook
- vc-git-region-history-mode-hook
- vc-log-after-operation-hook
- vc-logentry-check-hook
- visible-mode-hook
- visual-line-mode-hook
- window-configuration-change-hook
- window-divider-mode-hook
- window-setup-hook
- window-state-change-hook