aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-11-29 05:11:09 +0000
committerStefan Monnier2000-11-29 05:11:09 +0000
commit053b8d3589747f2ce7008c2b6b028fb616b63d17 (patch)
tree8664b03ac66f4f76f3ef4f13672d9048d66c12d6
parent242c13e8b296e450530c299a3aff06849bd65697 (diff)
downloademacs-053b8d3589747f2ce7008c2b6b028fb616b63d17.tar.gz
emacs-053b8d3589747f2ce7008c2b6b028fb616b63d17.zip
(comment-indent): Save excursion around call to comment-indent-function.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/newcomment.el4
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 @@
12000-11-29 Stefan Monnier <monnier@cs.yale.edu>
2
3 * newcomment.el (comment-indent): Save excursion around call to
4 comment-indent-function.
5
12000-11-29 Miles Bader <miles@gnu.org> 62000-11-29 Miles Bader <miles@gnu.org>
2 7
3 * subr.el (member-ignore-case): Return the tail of the list who's 8 * 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 @@
6;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> 6;; Maintainer: Stefan Monnier <monnier@cs.yale.edu>
7;; Keywords: comment uncomment 7;; Keywords: comment uncomment
8;; Version: $Name: $ 8;; Version: $Name: $
9;; Revision: $Id: newcomment.el,v 1.24 2000/11/14 15:09:40 monnier Exp $ 9;; Revision: $Id: newcomment.el,v 1.25 2000/11/21 21:31:16 monnier Exp $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -436,7 +436,7 @@ If CONTINUE is non-nil, use the `comment-continuation' markers if any."
436 (insert ender))) 436 (insert ender)))
437 (goto-char begpos) 437 (goto-char begpos)
438 ;; Compute desired indent. 438 ;; Compute desired indent.
439 (setq indent (funcall comment-indent-function)) 439 (setq indent (save-excursion (funcall comment-indent-function)))
440 (if (not indent) 440 (if (not indent)
441 ;; comment-indent-function refuses delegates to indent. 441 ;; comment-indent-function refuses delegates to indent.
442 (indent-according-to-mode) 442 (indent-according-to-mode)