aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDaniel Colascione2015-05-04 11:46:12 -0700
committerDaniel Colascione2015-05-04 11:46:12 -0700
commit255a011f0ecf004b31c59945b10154b10fac3af1 (patch)
treeef4c1809537fd50c98cd137dbb70a8d48c015616 /doc
parentfe4e258b17feb529ac364daee67a5f0441f851f4 (diff)
downloademacs-255a011f0ecf004b31c59945b10154b10fac3af1.tar.gz
emacs-255a011f0ecf004b31c59945b10154b10fac3af1.zip
Add `save-mark-and-excursion', which has the old `save-excursion' behavior
* doc/lispref/positions.texi (Excursions): Document `save-mark-and-excursion'. * lisp/font-lock.el (font-lock-fontify-block): Use `save-mark-and-excursion' instead of `save-excursion', restoring Emacs 24 behavior. * lisp/simple.el (save-mark-and-excursion--save) (save-mark-and-excursion--restore): New functions. (save-mark-and-excursion): New user macro. * src/editfns.c (Fsave_excursion): Mention `save-mark-and-excursion' in `save-excursion' documentation.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/positions.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index fc47f1c7a78..e7c79d58241 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -888,6 +888,14 @@ type @code{nil}. @xref{Marker Insertion Types}. Therefore, when the
888saved point value is restored, it normally comes before the inserted 888saved point value is restored, it normally comes before the inserted
889text. 889text.
890 890
891@defmac save-mark-and-excursion body@dots{}
892@cindex mark excursion
893@cindex point excursion
894This macro is like @code{save-excursion}, but also saves and restores
895the mark location and @code{mark-active}. This macro does what
896@code{save-excursion} did before Emacs 25.1.
897@end defmac
898
891@node Narrowing 899@node Narrowing
892@section Narrowing 900@section Narrowing
893@cindex narrowing 901@cindex narrowing