summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-02-28 22:29:03 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-02-28 22:29:03 +0000
commitdacce8310406e94994e6c7d8b63e73784134b431 (patch)
treee4a42d255759040c5ced4054fba247a7ec9234e2
parent42b4ee207b146590df193db03be6487a26098797 (diff)
downloademacs-dacce8310406e94994e6c7d8b63e73784134b431.tar.gz
(fill-comment-paragraph): Don't try to do comment-paragraph filling
if the commark doesn't match comment-start-skip.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/fill.el8
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f39d6a0d807..528f817a01f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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>
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 8c563656275..418d7c17dc2 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -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