List of Emacs Hooks

By Xah Lee. Date: . Last updated: .

Here's a complete list of emacs hook variables, as of GNU Emacs 27.1 , 2020-08-11.

Note: your list may be shorter or longer, depending on what packages you've loaded.

You can list them in your copy of emacs by:

Alt+x apropos-variable then type “-hook”.

[see Emacs: What is Hook]

List of Emacs Hooks

  1. Buffer-menu-mode-hook
  2. Custom-mode-hook
  3. Info-mode-hook
  4. Info-selection-hook
  5. abbrev-mode-hook
  6. activate-mark-hook
  7. after-change-major-mode-hook
  8. after-init-hook
  9. after-revert-hook
  10. after-save-hook
  11. after-set-visited-file-name-hook
  12. after-setting-font-hook
  13. apropos-mode-hook
  14. authinfo-mode-hook
  15. auto-composition-mode-hook
  16. auto-compression-mode-hook
  17. auto-encryption-mode-hook
  18. auto-fill-mode-hook
  19. auto-lower-mode-hook
  20. auto-raise-mode-hook
  21. auto-revert-load-hook
  22. auto-revert-mode-hook
  23. auto-revert-tail-mode-hook
  24. auto-save-hook
  25. auto-save-mode-hook
  26. auto-save-visited-mode-hook
  27. awk-mode-hook
  28. before-hack-local-variables-hook
  29. before-init-hook
  30. before-make-frame-hook
  31. before-revert-hook
  32. before-save-hook
  33. binary-overwrite-mode-hook
  34. blink-cursor-mode-hook
  35. bookmark-after-jump-hook
  36. bookmark-bmenu-mode-hook
  37. bookmark-edit-annotation-mode-hook
  38. bookmark-exit-hook
  39. bookmark-load-hook
  40. browse-url-of-file-hook
  41. buffer-list-update-hook
  42. c++-mode-hook
  43. c--unsafe-post-self-insert-hook-functions
  44. c-initialization-hook
  45. c-mode-common-hook
  46. c-mode-hook
  47. c-special-indent-hook
  48. change-major-mode-after-body-hook
  49. change-major-mode-hook
  50. cl-old-struct-compat-mode-hook
  51. clone-buffer-hook
  52. clone-indirect-buffer-hook
  53. column-number-mode-hook
  54. comint-exec-hook
  55. comint-mode-hook
  56. compilation-filter-hook
  57. compilation-minor-mode-hook
  58. compilation-mode-hook
  59. compilation-shell-minor-mode-hook
  60. compilation-start-hook
  61. completion-in-region-mode-hook
  62. completion-list-mode-hook
  63. completion-setup-hook
  64. css-mode-hook
  65. cursor-intangible-mode-hook
  66. cursor-sensor-mode-hook
  67. custom-define-hook
  68. cvs-dired-use-hook
  69. deactivate-mark-hook
  70. delay-mode-hooks
  71. delayed-after-hook-functions
  72. delayed-mode-hooks
  73. delayed-warnings-hook
  74. delete-selection-mode-hook
  75. desktop-after-read-hook
  76. desktop-delay-hook
  77. desktop-no-desktop-file-hook
  78. desktop-not-loaded-hook
  79. desktop-save-hook
  80. desktop-save-mode-hook
  81. dframe-after-select-attached-frame-hook
  82. dframe-setup-hook
  83. diff-auto-refine-mode-hook
  84. diff-minor-mode-hook
  85. diff-mode-hook
  86. dired-after-readin-hook
  87. dired-before-readin-hook
  88. dired-hide-details-mode-hook
  89. dired-initial-position-hook
  90. dired-isearch-filenames-mode-hook
  91. dired-load-hook
  92. dired-mode-hook
  93. dired-omit-mode-hook
  94. display-line-numbers-mode-hook
  95. echo-area-clear-hook
  96. edit-abbrevs-mode-hook
  97. eieio-hook
  98. eldoc-mode-hook
  99. electric-help-mode-hook
  100. electric-indent-local-mode-hook
  101. electric-indent-mode-hook
  102. electric-layout-local-mode-hook
  103. electric-layout-mode-hook
  104. electric-pair-local-mode-hook
  105. electric-pair-mode-hook
  106. electric-quote-local-mode-hook
  107. electric-quote-mode-hook
  108. elisp-byte-code-mode-hook
  109. emacs-lisp-compilation-mode-hook
  110. emacs-lisp-mode-hook
  111. emacs-startup-hook
  112. eshell-after-prompt-hook
  113. eshell-alias-load-hook
  114. eshell-alternate-command-hook
  115. eshell-arg-load-hook
  116. eshell-banner-load-hook
  117. eshell-before-prompt-hook
  118. eshell-cmd-load-hook
  119. eshell-cmpl-load-hook
  120. eshell-directory-change-hook
  121. eshell-dirs-load-hook
  122. eshell-exec-hook
  123. eshell-exit-hook
  124. eshell-ext-load-hook
  125. eshell-first-time-mode-hook
  126. eshell-glob-load-hook
  127. eshell-hist-load-hook
  128. eshell-hist-unload-hook
  129. eshell-io-load-hook
  130. eshell-kill-hook
  131. eshell-load-hook
  132. eshell-mode-hook
  133. eshell-mode-unload-hook
  134. eshell-module-unload-hook
  135. eshell-named-command-hook
  136. eshell-parse-argument-hook
  137. eshell-post-command-hook
  138. eshell-post-rewrite-command-hook
  139. eshell-pre-command-hook
  140. eshell-pre-rewrite-command-hook
  141. eshell-pred-load-hook
  142. eshell-prepare-command-hook
  143. eshell-proc-load-hook
  144. eshell-prompt-load-hook
  145. eshell-rewrite-command-hook
  146. eshell-script-load-hook
  147. eshell-term-load-hook
  148. eshell-unix-load-hook
  149. eshell-unload-hook
  150. eshell-var-load-hook
  151. eval-expression-minibuffer-setup-hook
  152. eww-after-render-hook
  153. eww-bookmark-mode-hook
  154. eww-buffers-mode-hook
  155. eww-history-mode-hook
  156. eww-mode-hook
  157. exit-language-environment-hook
  158. ff-file-created-hook
  159. ff-not-found-hook
  160. ff-post-load-hook
  161. ff-pre-find-hook
  162. ff-pre-load-hook
  163. fido-mode-hook
  164. file-name-shadow-mode-hook
  165. find-file-hook
  166. find-function-after-hook
  167. find-tag-hook
  168. first-change-hook
  169. focus-in-hook
  170. focus-out-hook
  171. font-lock-mode-hook
  172. global-auto-composition-mode-hook
  173. global-auto-revert-mode-hook
  174. global-display-line-numbers-mode-hook
  175. global-eldoc-mode-hook
  176. global-font-lock-mode-hook
  177. global-prettify-symbols-mode-hook
  178. global-visual-line-mode-hook
  179. global-xah-math-input-mode-hook
  180. gnus-apply-kill-hook
  181. gnus-load-hook
  182. gnus-mode-hook
  183. gnus-summary-prepare-exit-hook
  184. go-mode-hook
  185. godoc-mode-hook
  186. grep-setup-hook
  187. hack-local-variables-hook
  188. help-mode-hook
  189. horizontal-scroll-bar-mode-hook
  190. html-autoview-mode-hook
  191. html-mode-hook
  192. htmlize-after-hook
  193. htmlize-before-hook
  194. htmlize-file-hook
  195. ibuffer-auto-mode-hook
  196. ibuffer-hook
  197. ibuffer-load-hook
  198. ibuffer-mode-hook
  199. icomplete-minibuffer-setup-hook
  200. icomplete-mode-hook
  201. idl-mode-hook
  202. ido-everywhere-hook
  203. ido-make-buffer-list-hook
  204. ido-make-dir-list-hook
  205. ido-make-file-list-hook
  206. ido-minibuffer-setup-hook
  207. ido-setup-hook
  208. image-minor-mode-hook
  209. imenu-after-jump-hook
  210. inferior-python-mode-hook
  211. inhibit-modification-hooks
  212. inhibit-point-motion-hooks
  213. inhibit-startup-hooks
  214. input-method-activate-hook
  215. input-method-after-insert-chunk-hook
  216. input-method-deactivate-hook
  217. isearch-mode-end-hook
  218. isearch-mode-end-hook-quit
  219. isearch-mode-hook
  220. isearch-update-post-hook
  221. ispell-change-dictionary-hook
  222. ispell-initialize-spellchecker-hook
  223. ispell-minor-mode-hook
  224. ispell-update-post-hook
  225. java-mode-hook
  226. jit-lock-debug-mode-hook
  227. js-jsx-mode-hook
  228. js-mode-hook
  229. kbd-macro-termination-hook
  230. keyfreq-autosave-mode-hook
  231. keyfreq-mode-hook
  232. kill-buffer-hook
  233. kill-emacs-hook
  234. line-number-mode-hook
  235. lisp-interaction-mode-hook
  236. lisp-mode-hook
  237. mail-citation-hook
  238. mail-setup-hook
  239. menu-bar-mode-hook
  240. menu-bar-update-hook
  241. messages-buffer-mode-hook
  242. mhtml-mode-hook
  243. minibuffer-exit-hook
  244. minibuffer-inactive-mode-hook
  245. minibuffer-setup-hook
  246. mouse-leave-buffer-hook
  247. mouse-wheel-mode-hook
  248. next-error-follow-minor-mode-hook
  249. next-error-hook
  250. normal-erase-is-backspace-mode-hook
  251. ns-sent-selection-hooks
  252. nxml-completion-hook
  253. nxml-in-mixed-content-hook
  254. nxml-mode-hook
  255. objc-mode-hook
  256. occur-edit-mode-hook
  257. occur-hook
  258. occur-mode-find-occurrence-hook
  259. occur-mode-hook
  260. overwrite-mode-hook
  261. package--post-download-archives-hook
  262. package-menu-mode-hook
  263. paragraph-indent-minor-mode-hook
  264. paragraph-indent-text-mode-hook
  265. pcomplete-try-first-hook
  266. pike-mode-hook
  267. post-command-hook
  268. post-gc-hook
  269. post-self-insert-hook
  270. pre-abbrev-expand-hook
  271. pre-command-hook
  272. prefix-command-preserve-state-hook
  273. prettify-symbols-mode-hook
  274. process-menu-mode-hook
  275. prog-mode-hook
  276. python-mode-hook
  277. python-shell-first-prompt-hook
  278. quickurl-reread-hook-postfix
  279. quit-window-hook
  280. read-only-mode-hook
  281. recentf-dialog-mode-hook
  282. recentf-load-hook
  283. recentf-mode-hook
  284. recentf-used-hooks
  285. replace-update-post-hook
  286. rfn-eshadow-setup-minibuffer-hook
  287. rfn-eshadow-update-overlay-hook
  288. rmail-delete-message-hook
  289. rmail-get-new-mail-hook
  290. rmail-mode-hook
  291. rmail-quit-hook
  292. rmail-show-message-hook
  293. rng-schema-change-hook
  294. rng-validate-mode-hook
  295. ruby-mode-hook
  296. save-place-local-mode-hook
  297. save-place-mode-hook
  298. savehist-mode-hook
  299. savehist-save-hook
  300. scroll-bar-mode-hook
  301. scss-mode-hook
  302. select-tags-table-mode-hook
  303. set-language-environment-hook
  304. sgml-electric-tag-pair-mode-hook
  305. sgml-mode-hook
  306. sh-electric-here-document-mode-hook
  307. sh-learned-buffer-hook
  308. sh-mode-hook
  309. sh-set-shell-hook
  310. shell-dirtrack-mode-hook
  311. shell-mode-hook
  312. show-paren-mode-hook
  313. signal-hook-function
  314. size-indication-mode-hook
  315. special-mode-hook
  316. speedbar-after-create-hook
  317. speedbar-before-delete-hook
  318. speedbar-before-popup-hook
  319. speedbar-before-visiting-file-hook
  320. speedbar-before-visiting-tag-hook
  321. speedbar-load-hook
  322. speedbar-mode-hook
  323. speedbar-reconfigure-keymaps-hook
  324. speedbar-scanner-reset-hook
  325. speedbar-timer-hook
  326. speedbar-vc-directory-enable-hook
  327. speedbar-vc-in-control-hook
  328. speedbar-visiting-file-hook
  329. speedbar-visiting-tag-hook
  330. suspend-hook
  331. suspend-resume-hook
  332. tab-bar-history-mode-hook
  333. tab-bar-mode-hook
  334. tab-switcher-mode-hook
  335. tabulated-list-mode-hook
  336. tabulated-list-revert-hook
  337. tags-table-mode-hook
  338. temp-buffer-resize-mode-hook
  339. temp-buffer-setup-hook
  340. temp-buffer-show-hook
  341. temp-buffer-window-setup-hook
  342. temp-buffer-window-show-hook
  343. term-exec-hook
  344. term-load-hook
  345. term-mode-hook
  346. term-setup-hook
  347. text-mode-hook
  348. tool-bar-mode-hook
  349. tooltip-mode-hook
  350. tramp--startup-hook
  351. tramp-cleanup-all-connections-hook
  352. tramp-cleanup-connection-hook
  353. tramp-handle-file-local-copy-hook
  354. tramp-handle-write-region-hook
  355. transient-mark-mode-hook
  356. tty-setup-hook
  357. unify-8859-on-decoding-mode-hook
  358. unify-8859-on-encoding-mode-hook
  359. url-cookie-mode-hook
  360. url-handler-mode-hook
  361. url-load-hook
  362. use-hard-newlines-hook
  363. vc-before-checkin-hook
  364. vc-checkin-hook
  365. vc-checkout-hook
  366. vc-git-log-edit-mode-hook
  367. vc-git-log-view-mode-hook
  368. vc-git-region-history-mode-hook
  369. visible-mode-hook
  370. visual-line-mode-hook
  371. wdired-mode-hook
  372. window-configuration-change-hook
  373. window-divider-mode-hook
  374. window-setup-hook
  375. window-state-change-hook
  376. xah-clojure-mode-hook
  377. xah-css-mode-hook
  378. xah-elisp-mode-hook
  379. xah-find-output-mode-hook
  380. xah-fly-command-mode-activate-hook
  381. xah-fly-insert-mode-activate-hook
  382. xah-fly-keys-hook
  383. xah-html-mode-hook
  384. xah-js-mode-hook
  385. xah-math-input-mode-hook
  386. xah-run-current-file-after-hook
  387. xah-run-current-file-before-hook
  388. xah-text-mode-hook
  389. xah-ts-mode-hook
  390. xref--transient-buffer-mode-hook
  391. xref--xref-buffer-mode-hook
  392. xref-after-jump-hook
  393. xref-after-return-hook
  394. xref-etags-mode-hook

Put $5 at https://www.patreon.com/xahlee , or goto paypal.com and pay to Xah@XahLee.org . Message me on XahLee discord, say so, ask me questions.
Or Buy Xah Emacs Tutorial