From 5a7139eec2c0a129a72f4715a655c791b5e810c1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 4 Mar 2004 00:29:50 +0000 Subject: [PATCH] (fill-comment-paragraph): Be more careful when recognizing leading comment on code line. --- lisp/ChangeLog | 17 +++++++++++++++++ lisp/textmodes/fill.el | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 145a95c6288..09605839013 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2004-03-03 Stefan Monnier + + * textmodes/fill.el (fill-comment-paragraph): Be more careful when + recognizing leading comment on code line. + +2004-03-02 Stefan Monnier + + * textmodes/fill.el (fill-paragraph): Don't check comment-start-skip, + only comment-start (in case the mode hasn't set it). + + * Makefile.in (AUTOGENEL): New var. + (bootstrap-prepare): Rename from bootstrap-clean. + Don't remove elc files. + (maintainer-clean): New target. + + * xml.el (xml-get-attribute-or-nil): Simplify. + 2004-03-02 Juri Linkov * net/browse-url.el (browse-url-netscape, browse-url-mozilla) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 69cb7fd8d06..7a794d67c5e 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -822,7 +822,11 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (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 -- 2.39.2