]> code.delx.au - gnu-emacs/blobdiff - lispref/positions.texi
(mouse-avoidance-point-position): Use posn-at-point instead of compute-motion.
[gnu-emacs] / lispref / positions.texi
index 822238a6342f85ed7ffb6c3fb7afe07b32017fbb..f56e1a6a3898d63a6b232e1c2aac1480f0f66b9e 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  Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001,
+@c   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/positions
 @node Positions, Markers, Frames, Top
@@ -15,14 +15,17 @@ speak of the character before or after a given position.  However, we
 often speak of the character ``at'' a position, meaning the character
 after that position.
 
-  Positions are usually represented as integers starting from 1, but can
-also be represented as @dfn{markers}---special objects that relocate
-automatically when text is inserted or deleted so they stay with the
-surrounding characters.  Functions that expect an argument to be a
-position (an integer), but accept a marker as a substitute, normally
-ignore the marker buffer.  Of course, markers used this way usually
-point to a position in the buffer that the function operates on, but
-that is entirely the programmer's responsibility.  @xref{Markers}.
+  Positions are usually represented as integers starting from 1, but
+can also be represented as @dfn{markers}---special objects that
+relocate automatically when text is inserted or deleted so they stay
+with the surrounding characters.  Functions that expect an argument to
+be a position (an integer), but accept a marker as a substitute,
+normally ignore which buffer the marker points into; they convert the
+marker to an integer, and use that integer, exactly as if you had
+passed the integer as the argument, even if the marker points to the
+``wrong'' buffer.  A marker that points nowhere cannot convert to an
+integer; using it instead of an integer causes an error.
+@xref{Markers}.
 
   See also the ``field'' feature (@pxref{Fields}), which provides
 functions that are used by many cursor-motion commands.
@@ -414,7 +417,7 @@ Here is an example of using @code{count-lines}:
 @defun line-number-at-pos &optional pos
 @cindex line number
 This function returns the line number in the current buffer
-corresponding the buffer position @var{pos}.  If @var{pos} is @code{nil}
+corresponding to the buffer position @var{pos}.  If @var{pos} is @code{nil}
 or omitted, the current buffer position is used.
 @end defun
 
@@ -633,7 +636,7 @@ the end of the accessible portion of the buffer, and pass @var{line} and
 
 When you use @code{compute-motion} for the minibuffer, you need to use
 @code{minibuffer-prompt-width} to get the horizontal position of the
-beginning of the first screen line.  @xref{Minibuffer Misc}.
+beginning of the first screen line.  @xref{Minibuffer Contents}.
 @end defun
 
 @node List Motion
@@ -717,11 +720,11 @@ to 1.
 @end deffn
 
 @defopt defun-prompt-regexp
-If non-@code{nil}, this variable holds a regular expression that
-specifies what text can appear before the open-parenthesis that starts a
-defun.  That is to say, a defun begins on a line that starts with a
-match for this regular expression, followed by a character with
-open-parenthesis syntax.
+If non-@code{nil}, this buffer-local variable holds a regular
+expression that specifies what text can appear before the
+open-parenthesis that starts a defun.  That is to say, a defun begins
+on a line that starts with a match for this regular expression,
+followed by a character with open-parenthesis syntax.
 @end defopt
 
 @defopt open-paren-in-column-0-is-defun-start
@@ -826,13 +829,13 @@ after the completion of the excursion.
 described elsewhere (see @ref{Window Configurations}, and @pxref{Frame
 Configurations}).
 
-@defspec save-excursion forms@dots{}
+@defspec save-excursion body@dots{}
 @cindex mark excursion
 @cindex point excursion
 @cindex current buffer excursion
 The @code{save-excursion} special form saves the identity of the current
 buffer and the values of point and the mark in it, evaluates
-@var{forms}, and finally restores the buffer and its saved values of
+@var{body}, and finally restores the buffer and its saved values of
 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}).
 
@@ -852,8 +855,8 @@ One way to restore these correspondences, and the selected window, is to
 use @code{save-window-excursion} inside @code{save-excursion}
 (@pxref{Window Configurations}).
 
-The value returned by @code{save-excursion} is the result of the last of
-@var{forms}, or @code{nil} if no @var{forms} are given.
+The value returned by @code{save-excursion} is the result of the last
+form in @var{body}, or @code{nil} if no body forms were given.
 
 @example
 @group