summaryrefslogtreecommitdiff
path: root/doc/emacs/modes.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2011-12-03 00:50:10 +0800
committerChong Yidong <cyd@gnu.org>2011-12-03 00:50:10 +0800
commit95ca9bc7340332c09c0a083aeae21cd25bb3928b (patch)
tree0cf4e9fba2910e9ee15fdc0d87e1ccbd42ca5b1c /doc/emacs/modes.texi
parent99c79fee5189adb5c4fe52fab4cc1e9f55d2a6bf (diff)
downloademacs-95ca9bc7340332c09c0a083aeae21cd25bb3928b.tar.gz
More updates to Text chapter of Emacs manual.
* text.texi (Pages): Mention how formfeed chars are displayed. (Auto Fill): Note convention for calling auto-fill-mode from Lisp. Describe adaptive filling more precisely. (Fill Commands): Note that filling removes excess whitespace. (Text Mode): Note auto-mode-alist entries for Text mode. TAB is now bound to indent-for-tab-command in Text mode. (Outline Mode): Copyedits. (Outline Visibility): Note that Reveal mode is a buffer-local minor mode. * modes.texi (Major Modes): Move note about checking major-mode in a hook function here, from Text mode.
Diffstat (limited to 'doc/emacs/modes.texi')
-rw-r--r--doc/emacs/modes.texi2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 60636ce040f..e5be13d6ce5 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -115,6 +115,8 @@ hooks. Each mode hook is named after its major mode, e.g. Fortran
mode has @code{fortran-mode-hook}. Furthermore, all text-based major
modes run @code{text-mode-hook}, and all programming language modes
run @code{prog-mode-hook}, prior to running their own mode hooks.
+Hook functions can look at the value of the variable @code{major-mode}
+to see which mode is actually being entered.
Mode hooks are commonly used to enable minor modes (@pxref{Minor
Modes}). For example, you can put the following lines in your init