This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: doom@kzsu.stanford.edu (Joe Brenner)
From: "Stefan Monnier <foo@acm.com>"
<monnier+comp.emacs/news/@RUM.cs.yale.edu>
Subject: Re: From emacs to xemacs.
Date: 09 Mar 2001 12:54:55 -0500
>>>>> "Joe" == Joe Brenner <doom@kzsu.stanford.edu> writes:
> Ah. Is that still in use in Gnu Emacs? Does this explain
> why it can't handle something as simple as <!--multline -->
> --comments--> ?
> (The above is what you get if you've got auto-fill on in
> html mode. It closes the comment at the end of the line,
> and then appears to try and open another comment on the next
> line, but doesn't get it right.
[ responding here as the author of newcomment.el which reworked most
of the comment-region kind of code as well as the handling of comments
in auto-fill-mode ]
Thanks for pointing out this case. I just tried it with the beta
test of Emacs-21 and it seems that the problem was somehow corrected.
I believe the correction was to properly set `comment-start-skip' (the
value used in the old sgml-mode.el only matches `--' but not `<!--').
You can try
(add-hook 'html-mode-hook
(lambda ()
(setq comment-start-skip "\\(\\)\\(<!\\)--[ \t]*")))
which should fix it.
Note that this will do
<!-- bla -->
<!-- bla -->
rather than
<!-- bla --
-- bla -->
> In fact, doing nothing at all would be The Right Thing in my opinion.)
Try (setq comment-multi-line t).
===