merge whitespace.el change from trunk
[bpt/emacs.git] / doc / lispref / positions.texi
index a74a4ab..3a6fc6f 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/positions
 @node Positions, Markers, Frames, Top
@@ -220,13 +220,13 @@ This function is just like @code{forward-word}, except that it moves
 backward until encountering the front of a word, rather than forward.
 @end deffn
 
-@defvar words-include-escapes
+@defopt words-include-escapes
 @c Emacs 19 feature
 This variable affects the behavior of @code{forward-word} and everything
 that uses it.  If it is non-@code{nil}, then characters in the
 ``escape'' and ``character quote'' syntax classes count as part of
 words.  Otherwise, they do not.
-@end defvar
+@end defopt
 
 @defvar inhibit-field-text-motion
 If this variable is non-@code{nil}, certain motion functions including
@@ -299,33 +299,6 @@ The division of the buffer into text lines is not affected by the width
 of the window, by line continuation in display, or by how tabs and
 control characters are displayed.
 
-@deffn Command goto-line line &optional buffer
-This function moves point to the front of the @var{line}th line,
-counting from line 1 at beginning of the buffer, and leaves mark at the
-previous position.  If @var{line} is less than 1, it moves point to the
-beginning of the buffer.  If @var{line} is greater than the number of
-lines in the buffer, it moves point to the end of the buffer---that is,
-the @emph{end of the last line} of the buffer.
-
-If narrowing is in effect, then @var{line} still counts from the
-beginning of the buffer, but point cannot go outside the accessible
-portion.  So @code{goto-line} moves point to the beginning or end of the
-accessible portion, if the line number specifies an inaccessible
-position.
-
-The return value of @code{goto-line} is the difference between
-@var{line} and the line number of the line to which point actually was
-able to move (in the full buffer, before taking account of narrowing).
-Thus, the value is positive if the scan encounters the real end of the
-buffer before finding the specified line.  The value is zero if scan
-encounters the end of the accessible portion, but not the real end of
-the buffer.
-
-If you provide the optional argument @var{buffer}, @code{goto-line} uses
-@var{buffer} instead of the current buffer and displays it in another
-window, if it was not already visible.
-@end deffn
-
 @deffn Command beginning-of-line &optional count
 This function moves point to the beginning of the current line.  With an
 argument @var{count} not @code{nil} or 1, it moves forward
@@ -520,9 +493,14 @@ This function moves point to the start of the screen line @var{count}
 screen lines down from the screen line containing point.  If @var{count}
 is negative, it moves up instead.
 
-@code{vertical-motion} returns the number of screen lines over which it
-moved point.  The value may be less in absolute value than @var{count}
-if the beginning or end of the buffer was reached.
+The @var{count} argument can be a cons cell, @code{(@var{cols}
+. @var{lines})}, instead of an integer.  Then the function moves by
+@var{lines} screen lines, and puts point @var{cols} columns from the
+start of that screen line.
+
+The return value is the number of screen lines over which point was
+moved.  The value may be less in absolute value than @var{count} if
+the beginning or end of the buffer was reached.
 
 The window @var{window} is used for obtaining parameters such as the
 width, the horizontal scrolling, and the display table.  But
@@ -828,7 +806,9 @@ after the completion of the excursion.
 
   The forms for saving and restoring the configuration of windows are
 described elsewhere (see @ref{Window Configurations}, and @pxref{Frame
-Configurations}).
+Configurations}).  When only the identity of the current buffer needs
+to be saved and restored, it is preferable to use
+@code{save-current-buffer} instead.
 
 @defspec save-excursion body@dots{}
 @cindex mark excursion
@@ -839,10 +819,10 @@ buffer and the values of point and the mark in it, evaluates
 point and the mark.  All three saved values are restored even in case of
 an abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}).
 
-The @code{save-excursion} special form is the standard way to switch
-buffers or move point within one part of a program and avoid affecting
-the rest of the program.  It is used more than 4000 times in the Lisp
-sources of Emacs.
+The @code{save-excursion} special form is the standard way to move
+point within one part of a program and avoid affecting the rest of the
+program.  It is used more than 4000 times in the Lisp sources
+of Emacs.
 
 @code{save-excursion} does not save the values of point and the mark for
 other buffers, so changes in other buffers remain in effect after