emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 7741988: Fix documentation for `save-excursion'


From: Xue Fuqiao
Subject: [Emacs-diffs] master 7741988: Fix documentation for `save-excursion'
Date: Mon, 24 Aug 2015 14:16:56 +0000

branch: master
commit 7741988982ea5de8dea80702a510505bb153c86a
Author: Xue Fuqiao <address@hidden>
Commit: Xue Fuqiao <address@hidden>

    Fix documentation for `save-excursion'
    
    * 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 |    9 +++++----
 doc/lispref/positions.texi          |    3 +--
 lisp/mouse.el                       |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index 40abc44..f4e8d93 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -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
address@hidden Preserving point, mark, and buffer
address@hidden Point, mark, buffer preservation
address@hidden Preserving point and buffer
address@hidden 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
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index c972bbb..200935d 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -843,11 +843,10 @@ window configurations, see the forms described in 
@ref{Window
 Configurations} and in @ref{Frame Configurations}. @c frameset?
 
 @defspec save-excursion address@hidden
address@hidden 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}).
 
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5048271..f52b83b 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]