diff options
| author | Alan Mackenzie | 2016-11-10 21:22:05 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-11-10 21:22:05 +0000 |
| commit | db0b58da1d1e5724c783550103fcf5bb363bb713 (patch) | |
| tree | d3442a902d49261fc722d96d4d3bf040728fe54e | |
| parent | 78aece497ce9dc784d5e3d2707d76766eed2a174 (diff) | |
| download | emacs-db0b58da1d1e5724c783550103fcf5bb363bb713.tar.gz emacs-db0b58da1d1e5724c783550103fcf5bb363bb713.zip | |
Correct the statement about programming modes always running prog-mode-hook.
doc/emacs/modes.texi (Major Modes): Amend the statement about programming
modes running prog-mode-hook to say that it applies to many (not all) such
modes, and specifying exactly which modes.
| -rw-r--r-- | doc/emacs/modes.texi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index c1564e9299b..63e31ab568c 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi | |||
| @@ -113,10 +113,13 @@ hook}, a customizable list of Lisp functions to run each time the mode | |||
| 113 | is enabled in a buffer. @xref{Hooks}, for more information about | 113 | is enabled in a buffer. @xref{Hooks}, for more information about |
| 114 | hooks. Each mode hook is named after its major mode, e.g., Fortran | 114 | hooks. Each mode hook is named after its major mode, e.g., Fortran |
| 115 | mode has @code{fortran-mode-hook}. Furthermore, all text-based major | 115 | mode has @code{fortran-mode-hook}. Furthermore, all text-based major |
| 116 | modes run @code{text-mode-hook}, and all programming language modes | 116 | modes run @code{text-mode-hook}, and many programming language modes |
| 117 | run @code{prog-mode-hook}, prior to running their own mode hooks. | 117 | @footnote{More specifically, the modes which are ''derived'' from |
| 118 | Hook functions can look at the value of the variable @code{major-mode} | 118 | @code{prog-mode} (@pxref{Derived Modes,,, elisp, The Emacs Lisp |
| 119 | to see which mode is actually being entered. | 119 | Reference Manual}).} (including all those distributed with Emacs) run |
| 120 | @code{prog-mode-hook}, prior to running their own mode hooks. Hook | ||
| 121 | functions can look at the value of the variable @code{major-mode} to | ||
| 122 | see which mode is actually being entered. | ||
| 120 | 123 | ||
| 121 | Mode hooks are commonly used to enable minor modes (@pxref{Minor | 124 | Mode hooks are commonly used to enable minor modes (@pxref{Minor |
| 122 | Modes}). For example, you can put the following lines in your init | 125 | Modes}). For example, you can put the following lines in your init |