aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorKarl Heuer1999-03-26 18:02:24 +0000
committerKarl Heuer1999-03-26 18:02:24 +0000
commitaf0e29d18ecbe9a4bc5fb930e01e47edf29edbd6 (patch)
tree05bbd838608e2b66ac999904910113a17a39bfcd /lisp/simple.el
parentdb0e5441660f798b7c66703779763545f9d2594c (diff)
downloademacs-af0e29d18ecbe9a4bc5fb930e01e47edf29edbd6.tar.gz
emacs-af0e29d18ecbe9a4bc5fb930e01e47edf29edbd6.zip
(indent-new-comment-line): Handle use at a point
after a comment-end. Handle multiple comments.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 92874f5f02e..eb4f7a3f6db 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3219,9 +3219,13 @@ unless optional argument SOFT is non-nil."
3219 (if (not comment-multi-line) 3219 (if (not comment-multi-line)
3220 (save-excursion 3220 (save-excursion
3221 (if (and comment-start-skip 3221 (if (and comment-start-skip
3222 (let ((opoint (point))) 3222 (let ((opoint (point))
3223 inside)
3223 (forward-line -1) 3224 (forward-line -1)
3224 (re-search-forward comment-start-skip opoint t))) 3225 ;; Determine (more or less) whether
3226 ;; target position is inside a comment.
3227 (while (and (setq inside (re-search-forward comment-start-skip opoint t))
3228 (not (setq inside (not (search-forward comment-end opoint t))))))))
3225 ;; The old line is a comment. 3229 ;; The old line is a comment.
3226 ;; Set WIN to the pos of the comment-start. 3230 ;; Set WIN to the pos of the comment-start.
3227 ;; But if the comment is empty, look at preceding lines 3231 ;; But if the comment is empty, look at preceding lines