emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: html, css, and js modes working together


From: Dmitry Gutov
Subject: Re: html, css, and js modes working together
Date: Tue, 14 Feb 2017 03:34:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 13.02.2017 04:48, Tom Tromey wrote:

Here's my current patch, now with pre- and post-command hooks and
flyspell integration.  Font lock mostly works but has some oddities, and
I still didn't fix the html comment/syntax bug that Clément found.

Thanks, the patch looks good on a high level.

I do see the oddities, and it seems the wonkiness is more related to setting up submode regions, because when the font-lock acts up, indentation can fail on that line as well.

Here's a broken example, for you reference. From the outset, the closing "style" tag and both "script" tags (though not their contents) are unfontified. By adding/deleting the closing ">" in the closing "</script>" tag, I can break the fontification of the remainder of the file, and indentation gets broken as well.

I'm not sure, but maybe the missing thing is the removal of the 'mhtml-submode' text property near the beginning of mhtml-syntax-propertize.

<!DOCTYPE html>
<html>
  <head>
    <title>test</title>
    <style type="text/css">
      h1 {
        font-family: 'Spinnaker', sans-serif;
      }
    </style>
    <script>
      function() {
        return 25;
      }
    </script>
  </head>
  <body>
  </body>
</html>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]