Merge from emacs-23
[bpt/emacs.git] / doc / emacs / abbrevs.texi
index 1dc4f62..160c704 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
-@c   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Abbrevs
 @chapter Abbrevs
@@ -213,10 +213,11 @@ to turn on Abbrev mode first.  It may also be useful together with a
 special set of abbrev definitions for making several global replacements at
 once.  This command is effective even if Abbrev mode is not enabled.
 
-  Expanding any abbrev first runs the hook @code{pre-abbrev-expand-hook}
-(@pxref{Hooks}).
+  Expanding any abbrev runs @code{abbrev-expand-functions}, a special
+hook.  Functions in this special hook can make arbitrary changes to
+the abbrev expansion.  @xref{Abbrev Expansion,,, elisp, The Emacs Lisp
+Reference Manual}.
 
-@need 1500
 @node Editing Abbrevs
 @section Examining and Editing Abbrevs
 
@@ -234,9 +235,9 @@ Edit a list of abbrevs; you can add, alter or remove definitions.
 @example
 @var{various other tables@dots{}}
 (lisp-mode-abbrev-table)
-"dk"          0    "define-key"
+"dk"          0    "define-key"
 (global-abbrev-table)
-"dfn"         0    "definition"
+"dfn"         0    "definition"
 @end example
 
 @noindent
@@ -303,16 +304,19 @@ that, when executed, define the same abbrevs that you currently have.
 @findex read-abbrev-file
 @findex quietly-read-abbrev-file
 @vindex abbrev-file-name
+@cindex abbrev file
   @kbd{M-x read-abbrev-file} reads a file name using the minibuffer
 and then reads the file, defining abbrevs according to the contents of
 the file.  The function @code{quietly-read-abbrev-file} is similar
 except that it does not display a message in the echo area; you cannot
-invoke it interactively, and it is used primarily in the @file{.emacs}
-file.  If either of these functions is called with @code{nil} as the
-argument, it uses the file name specified in the variable
-@code{abbrev-file-name}, which is by default @code{"~/.abbrev_defs"}.
-That file is your standard abbrev definition file, and Emacs loads
-abbrevs from it automatically when it starts up.
+invoke it interactively, and it is used primarily in your init file
+(@pxref{Init File}).  If either of these functions is called with
+@code{nil} as the argument, it uses the file given by the variable
+@code{abbrev-file-name}, which is @file{~/.emacs.d/abbrev_defs} by
+default.  This is your standard abbrev definition file, and Emacs
+loads abbrevs from it automatically when it starts up.  (As an
+exception, Emacs does not load the abbrev file when it is started in
+batch mode.  @xref{Initial Options}, for a description of batch mode.)
 
 @vindex save-abbrevs
   Emacs will offer to save abbrevs automatically if you have changed