Mercurial > emacs
comparison lisp/simple.el @ 24522:3147a1a92eeb
(indent-new-comment-line): Handle use at a point
after a comment-end. Handle multiple comments.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 26 Mar 1999 18:02:24 +0000 |
parents | f9e613360d62 |
children | d20e1cd24c00 |
comparison
equal
deleted
inserted
replaced
24521:f4dd298e46a3 | 24522:3147a1a92eeb |
---|---|
3217 (indent-to-left-margin) | 3217 (indent-to-left-margin) |
3218 (insert-and-inherit fill-prefix)) | 3218 (insert-and-inherit fill-prefix)) |
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 |
3228 ;; to find one that has a nonempty comment. | 3232 ;; to find one that has a nonempty comment. |
3229 | 3233 |