diff options
| author | Stefan Monnier | 2000-11-29 05:11:09 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-29 05:11:09 +0000 |
| commit | 053b8d3589747f2ce7008c2b6b028fb616b63d17 (patch) | |
| tree | 8664b03ac66f4f76f3ef4f13672d9048d66c12d6 | |
| parent | 242c13e8b296e450530c299a3aff06849bd65697 (diff) | |
| download | emacs-053b8d3589747f2ce7008c2b6b028fb616b63d17.tar.gz emacs-053b8d3589747f2ce7008c2b6b028fb616b63d17.zip | |
(comment-indent): Save excursion around call to comment-indent-function.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2000-11-29 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * newcomment.el (comment-indent): Save excursion around call to | ||
| 4 | comment-indent-function. | ||
| 5 | |||
| 1 | 2000-11-29 Miles Bader <miles@gnu.org> | 6 | 2000-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) |