]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-comment-paragraph): Don't try to do comment-paragraph filling
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 28 Feb 2008 22:29:03 +0000 (22:29 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 28 Feb 2008 22:29:03 +0000 (22:29 +0000)
if the commark doesn't match comment-start-skip.

lisp/ChangeLog
lisp/textmodes/fill.el

index f39d6a0d807454b31f205201c94efc201c9e69de..528f817a01f1dec441ccda355697196c8a2dc68b 100644 (file)
@@ -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>
index 8c563656275ffb28f7c460f2c7ed0926fd0261de..418d7c17dc2d3f4f400e28cda97a9eb4067dde09 100644 (file)
@@ -837,7 +837,13 @@ can take care of filling.  JUSTIFY is used as in `fill-paragraph'."
        (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