changeset 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 f4dd298e46a3
children 5c056d48bece
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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