summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2015-05-04 11:46:12 -0700
committerDaniel Colascione <dancol@dancol.org>2015-05-04 11:46:12 -0700
commit255a011f0ecf004b31c59945b10154b10fac3af1 (patch)
treeef4c1809537fd50c98cd137dbb70a8d48c015616 /lisp/font-lock.el
parentfe4e258b17feb529ac364daee67a5f0441f851f4 (diff)
downloademacs-255a011f0ecf004b31c59945b10154b10fac3af1.tar.gz
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 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 96b290e34f4..b1455131114 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1350,7 +1350,7 @@ delimit the region to fontify."
deactivate-mark)
;; Make sure we have the right `font-lock-keywords' etc.
(if (not font-lock-mode) (font-lock-set-defaults))
- (save-excursion
+ (save-mark-and-excursion
(save-match-data
(condition-case error-data
(if (or arg (not font-lock-mark-block-function))