From 053b8d3589747f2ce7008c2b6b028fb616b63d17 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 29 Nov 2000 05:11:09 +0000 Subject: [PATCH] (comment-indent): Save excursion around call to comment-indent-function. --- lisp/ChangeLog | 5 +++++ lisp/newcomment.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 92660226a26..e1aba07eaeb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-11-29 Stefan Monnier + + * newcomment.el (comment-indent): Save excursion around call to + comment-indent-function. + 2000-11-29 Miles Bader * subr.el (member-ignore-case): Return the tail of the list who's diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 3466b429301..610831bcff0 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -6,7 +6,7 @@ ;; Maintainer: Stefan Monnier ;; Keywords: comment uncomment ;; Version: $Name: $ -;; Revision: $Id: newcomment.el,v 1.24 2000/11/14 15:09:40 monnier Exp $ +;; Revision: $Id: newcomment.el,v 1.25 2000/11/21 21:31:16 monnier Exp $ ;; This file is part of GNU Emacs. @@ -436,7 +436,7 @@ If CONTINUE is non-nil, use the `comment-continuation' markers if any." (insert ender))) (goto-char begpos) ;; Compute desired indent. - (setq indent (funcall comment-indent-function)) + (setq indent (save-excursion (funcall comment-indent-function))) (if (not indent) ;; comment-indent-function refuses delegates to indent. (indent-according-to-mode) -- 2.39.5