changeset 54252:bd2c8b015291

(fill-comment-paragraph): Be more careful when recognizing leading comment on code line.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 04 Mar 2004 00:28:42 +0000
parents 1cf83db1ed7f
children 27114ce380a0
files lisp/textmodes/fill.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Wed Mar 03 23:43:02 2004 +0000
+++ b/lisp/textmodes/fill.el	Thu Mar 04 00:28:42 2004 +0000
@@ -822,7 +822,11 @@
 			     (looking-at comment-re)))
 		 ;; We may have gone too far.  Go forward again.
 		 (line-beginning-position
-		  (if (looking-at (concat ".*\\(?:" comment-start-skip "\\)"))
+		  (if (progn
+			(goto-char
+			 (or (comment-search-forward (line-end-position) t)
+			     (point)))
+			(looking-at comment-re))
 		      1 2))))
 	   ;; Find the beginning of the first line past the region to fill.
 	   (save-excursion