]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix documentation for `save-excursion'
authorXue Fuqiao <xfq.free@gmail.com>
Mon, 24 Aug 2015 14:04:46 +0000 (22:04 +0800)
committerXue Fuqiao <xfq.free@gmail.com>
Mon, 24 Aug 2015 14:04:46 +0000 (22:04 +0800)
* doc/lispref/positions.texi (Excursions):
* doc/lispintro/emacs-lisp-intro.texi (save-excursion)
(Template for save-excursion, Point and mark): `save-excursion'
does not save&restore the mark any more.

doc/lispintro/emacs-lisp-intro.texi
doc/lispref/positions.texi
lisp/mouse.el

index 40abc4421092e20c6a61e3b6c115522821fc095d..f4e8d93699286566c6d4465e665aefcc9adea5e3 100644 (file)
@@ -3227,6 +3227,7 @@ function, @code{multiply-by-seven}.  When you do this, a
 @smallexample
 @group
 multiply-by-seven is a Lisp function.
+
 (multiply-by-seven NUMBER)
 
 Multiply NUMBER by seven.
@@ -4152,8 +4153,8 @@ On the other hand, this function returns @code{nil} if the test is false.
 @section @code{save-excursion}
 @findex save-excursion
 @cindex Region, what it is
-@cindex Preserving point, mark, and buffer
-@cindex Point, mark, buffer preservation
+@cindex Preserving point and buffer
+@cindex Point and buffer preservation
 @findex point
 @findex mark
 
@@ -4202,7 +4203,7 @@ region}.  Numerous commands work on the region, including
 @code{center-region}, @code{count-lines-region}, @code{kill-region}, and
 @code{print-region}.
 
-The @code{save-excursion} special form saves the locations of point and
+The @code{save-excursion} special form saves the location of point and
 restores this position after the code within the body of the
 special form is evaluated by the Lisp interpreter.  Thus, if point were
 in the beginning of a piece of text and some code moved point to the end
@@ -4250,7 +4251,7 @@ one expression in the body, the value of the last one will be returned
 as the value of the @code{save-excursion} function.  The other
 expressions in the body are evaluated only for their side effects; and
 @code{save-excursion} itself is used only for its side effect (which
-is restoring the positions of point and mark).
+is restoring the position of point).
 
 @need 1250
 In more detail, the template for a @code{save-excursion} expression
index c972bbb2e43a02ad9cb46e08dfe94079b44c2ef8..200935d5c6040e49aea2dd44ec898dce7baebcc8 100644 (file)
@@ -843,11 +843,10 @@ window configurations, see the forms described in @ref{Window
 Configurations} and in @ref{Frame Configurations}. @c frameset?
 
 @defspec save-excursion body@dots{}
-@cindex mark excursion
 @cindex point excursion
 This special form saves the identity of the current buffer and the
 value of point in it, evaluates @var{body}, and finally
-restores the buffer and its saved value of point.  both saved values are
+restores the buffer and its saved value of point.  Both saved values are
 restored even in case of an abnormal exit via
 @code{throw} or error (@pxref{Nonlocal Exits}).
 
index 50482711006c7b05328b935ffc86c9b2d487d749..f52b83b05c8e03ed9648323fdec528180a977b91 100644 (file)
@@ -1027,7 +1027,7 @@ This must be bound to a mouse click."
   (interactive "e")
   (mouse-minibuffer-check click)
   (select-window (posn-window (event-start click)))
-  ;; We don't use save-excursion because that preserves the mark too.
+  ;; FIXME: Use save-excursion
   (let ((point-save (point)))
     (unwind-protect
        (progn (mouse-set-point click)