# HG changeset patch # User Stefan Monnier # Date 1078360122 0 # Node ID bd2c8b0152911dd4f7b8757cb149f7e0b586ef8a # Parent 1cf83db1ed7f5b9d549039e0d3383065b6299abe (fill-comment-paragraph): Be more careful when recognizing leading comment on code line. diff -r 1cf83db1ed7f -r bd2c8b015291 lisp/textmodes/fill.el --- 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