diff lisp/textmodes/fill.el @ 92360:4054054dd212

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1090
author Miles Bader <miles@gnu.org>
date Sat, 01 Mar 2008 01:28:31 +0000
parents 606f2d163a64 d2d9530e9b45
children 73a01bf5cb80
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Sat Mar 01 01:28:14 2008 +0000
+++ b/lisp/textmodes/fill.el	Sat Mar 01 01:28:31 2008 +0000
@@ -855,7 +855,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