[Top][All Lists]

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

Re: html, css, and js modes working together

From: Stefan Monnier
Subject: Re: html, css, and js modes working together
Date: Mon, 06 Feb 2017 09:17:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> I'm not sure what you're referring to here.  Do some of the existing
>> mixed mode things piggyback on the existing html mode?
> Both https://github.com/purcell/mmm-mode/ and
> https://github.com/vspinu/polymode/ do.

BTW: any chance to see some of those in elpa.git some day?

>> I guess my view is that it is always ok to make things in-tree work
>> better with each other, even at the expense of some code that is
>> out-of-tree and presumably relying on implementation details to do its
>> work.

What Dmitry is saying is that it's OK to define an ad-hoc multi-mode for
html+css+js (after all, they're all part of the HTML standard, oh and we
should also add SVG in there), but it should be structured as a separate
mode on top of html-mode, css-mode, and js-mode.

> That seems orthogonal to the possibility of breaking the cache after calling
> syntax-ppss while a different syntax table is in effect.

BTW, the better solution might be to extend syntax.el to provide some
hooks for that.  Not sure what's the best functionality to export, but
maybe a good solution is a way to manage several caches.  Or maybe we
can just have syntax-propertize-function place ad-hoc cache entries
(via some new syntax-ppss-add-to-cache function) at every
major-mode boundary.


reply via email to

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