# HG changeset patch # User Karl Heuer # Date 922471344 0 # Node ID 3147a1a92eebb0bb1f45737bdab59baef9f37679 # Parent f4dd298e46a3f5c94451b39f4df831e6e8777c57 (indent-new-comment-line): Handle use at a point after a comment-end. Handle multiple comments. diff -r f4dd298e46a3 -r 3147a1a92eeb lisp/simple.el --- a/lisp/simple.el Fri Mar 26 17:58:09 1999 +0000 +++ b/lisp/simple.el Fri Mar 26 18:02:24 1999 +0000 @@ -3219,9 +3219,13 @@ (if (not comment-multi-line) (save-excursion (if (and comment-start-skip - (let ((opoint (point))) + (let ((opoint (point)) + inside) (forward-line -1) - (re-search-forward comment-start-skip opoint t))) + ;; Determine (more or less) whether + ;; target position is inside a comment. + (while (and (setq inside (re-search-forward comment-start-skip opoint t)) + (not (setq inside (not (search-forward comment-end opoint t)))))))) ;; The old line is a comment. ;; Set WIN to the pos of the comment-start. ;; But if the comment is empty, look at preceding lines