changeset 80237:d2d9530e9b45

(fill-comment-paragraph): Don't try to do comment-paragraph filling if the commark doesn't match comment-start-skip.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 28 Feb 2008 22:29:03 +0000
parents 15905daa91d3
children 962e043b10b5
files lisp/ChangeLog lisp/textmodes/fill.el
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Feb 28 19:46:59 2008 +0000
+++ b/lisp/ChangeLog	Thu Feb 28 22:29:03 2008 +0000
@@ -1,5 +1,9 @@
 2008-02-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* textmodes/fill.el (fill-comment-paragraph): Don't try to do
+	comment-paragraph filling if the commark doesn't match
+	comment-start-skip.
+
 	* uniquify.el (uniquify-buffer-base-name): Undo last change.
 
 2008-02-28  Daiki Ueno  <ueno@unixuser.org>
--- a/lisp/textmodes/fill.el	Thu Feb 28 19:46:59 2008 +0000
+++ b/lisp/textmodes/fill.el	Thu Feb 28 22:29:03 2008 +0000
@@ -837,7 +837,13 @@
 	(goto-char comstart) (skip-chars-backward " \t")
 	(setq has-code-and-comment (not (bolp)))))
 
-    (if (not comstart)
+    (if (not (and comstart
+                  ;; Make sure the comment-start mark we found is accepted by
+                  ;; comment-start-skip.  If not, all bets are off, and
+                  ;; we'd better not mess with it.
+                  (string-match comment-start-skip
+                                (buffer-substring comstart comin))))
+
 	;; Return nil, so the normal filling will take place.
 	nil