]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/custom.texi
Manual updates for window changes.
[gnu-emacs] / doc / emacs / custom.texi
index 8465dd93519c2f7e364810235ed4db938a1c0b81..fd680576b4e6f0b001154991d2ff43474c84e441 100644 (file)
@@ -2,7 +2,7 @@
 @c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
 @c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Customization, Quitting, Amusements, Top
+@node Customization
 @chapter Customization
 @cindex customization
 
@@ -770,7 +770,7 @@ here's how to set up a hook to turn on Auto Fill mode when entering
 Text mode and other modes based on Text mode:
 
 @example
-(add-hook 'text-mode-hook 'turn-on-auto-fill)
+(add-hook 'text-mode-hook 'auto-fill-mode)
 @end example
 
   Here is another example, showing how to use a hook to customize the
@@ -820,6 +820,12 @@ the versions you added will remain in the hook variable together.  You
 can clear out individual functions by calling @code{remove-hook}, or
 do @code{(setq @var{hook-variable} nil)} to remove everything.
 
+@cindex buffer-local hooks
+  If the hook variable is buffer-local, the buffer-local variable will
+be used instead of the global variable.  However, if the buffer-local
+variable contains the element @code{t}, the global hook variable will
+be run as well.
+
 @node Locals
 @subsection Local Variables
 
@@ -1768,7 +1774,7 @@ button, @code{mouse-2} for the next, and so on.  Here is how you can
 redefine the second mouse button to split the current window:
 
 @example
-(global-set-key [mouse-2] 'split-window-vertically)
+(global-set-key [mouse-2] 'split-window-below)
 @end example
 
   The symbols for drag events are similar, but have the prefix
@@ -1848,10 +1854,10 @@ comes from a special area of the screen by means of dummy ``prefix
 keys.''  For example, if you click the mouse in the mode line, you get
 the prefix key @code{mode-line} before the ordinary mouse-button symbol.
 Thus, here is how to define the command for clicking the first button in
-a mode line to run @code{scroll-up}:
+a mode line to run @code{scroll-up-command}:
 
 @example
-(global-set-key [mode-line mouse-1] 'scroll-up)
+(global-set-key [mode-line mouse-1] 'scroll-up-command)
 @end example
 
   Here is the complete list of these dummy prefix keys and their
@@ -2168,8 +2174,7 @@ Turn off Line Number mode, a global minor mode.
 Turn on Auto Fill mode automatically in Text mode and related modes.
 
 @example
-(add-hook 'text-mode-hook
-  '(lambda () (auto-fill-mode 1)))
+(add-hook 'text-mode-hook 'auto-fill-mode)
 @end example
 
 This shows how to add a hook function to a normal hook variable
@@ -2177,19 +2182,9 @@ This shows how to add a hook function to a normal hook variable
 @code{lambda}, with a single-quote in front of it to make it a list
 constant rather than an expression.
 
-It's beyond the scope of this manual to explain Lisp functions, but for
-this example it is enough to know that the effect is to execute
-@code{(auto-fill-mode 1)} when Text mode is entered.  You can replace
-that with any other expression that you like, or with several
-expressions in a row.
-
-Emacs comes with a function named @code{turn-on-auto-fill} whose
-definition is @code{(lambda () (auto-fill-mode 1))}.  Thus, a simpler
-way to write the above example is as follows:
-
-@example
-(add-hook 'text-mode-hook 'turn-on-auto-fill)
-@end example
+It's beyond the scope of this manual to explain Lisp functions, but
+for this example it is enough to know that the effect is to execute
+the @code{auto-fill-mode} function when Text mode is entered.
 
 @item
 Load the installed Lisp library named @file{foo} (actually a file