# HG changeset patch # User Karl Heuer # Date 925103461 0 # Node ID 37dec422bd7cb285847f2445737e8815781e297b # Parent 5b75b8661881196451929607fc2f3983eaaa38d1 (indent-new-comment-line): Fix previous change. diff -r 5b75b8661881 -r 37dec422bd7c lisp/simple.el --- a/lisp/simple.el Mon Apr 26 05:09:59 1999 +0000 +++ b/lisp/simple.el Mon Apr 26 05:11:01 1999 +0000 @@ -3219,14 +3219,16 @@ (if (not comment-multi-line) (save-excursion (if (and comment-start-skip - (let ((opoint (point)) + (let ((opoint (1- (point))) inside) (forward-line -1) ;; 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. + (while (and (re-search-forward comment-start-skip opoint t) + (not (setq inside (or (equal comment-end "") + (not (search-forward comment-end opoint t))))))) + inside)) + ;; The old line has a comment and point was inside the comment. ;; Set WIN to the pos of the comment-start. ;; But if the comment is empty, look at preceding lines ;; to find one that has a nonempty comment.