Subject: bug#41897: closed (Re: bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 04 Jul 2020 13:14:02 +0000

Your bug report

#41897: 28.0.50; JavaScript comment filling with mhtml-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41897: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41897
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode
From: Alan Mackenzie <[email-masked]>
To: Simen Heggestøyl <[email-masked]>
Cc: Tom Tromey <[email-masked]>, [email-masked], Dmitry Gutov <[email-masked]>
Date: Sat, 4 Jul 2020 13:13:22 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, Simen.

On Mon, Jun 22, 2020 at 19:17:50 +0000, Alan Mackenzie wrote:
> We're gradually converging on working code.  Since yesterday, the
> improvements are:

> (i) (slightly) better handling of auto-fill-mode, which is no longer
> automatically enabled;

> (ii) An enhancement to CC Mode, used by mhtml-mode and js-mode, which
> invalidates a CC Mode cache used by the filling code.  This gets rid of
> a few strange looking bugs;

> (iii) The inclusion of "paragraph-" in the "crucial variables" thing, so
> that paragraph-start and paragraph-separate from js-mode get into
> mhtml-mode.

I've committed more or less the patch from my post of 2020-06-22, which
I'm convinced fixes the bug.  I'm closing the bug with this post.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).

Subject: 28.0.50; JavaScript comment filling with mhtml-mode
From: Simen Heggestøyl <[email-masked]>
To: [email-masked]
Date: Tue, 16 Jun 2020 19:08:44 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

In js-mode, the following JavaScript comment is filled as expected when
fill-paragraph (M-q) is used with point within it:

/*
 * This is a long comment that should break over multiple lines when fill-paragraph is used.
 */

Is filled as:

/*
 * This is a long comment that should break over multiple lines when
 * fill-paragraph is used.
 */

In mhtml-mode however, the same JavaScript comment:

<html>
  <script>
    /*
     * This is a long comment that should break over multiple lines when fill-paragraph is used.
     */
  </script>
</html>

Is filled as:

<html>
  <script>
    /* * This is a long comment that should break over multiple lines
     when fill-paragraph is used.  */
  </script>
</html>