From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: html, css, and js modes working together Date: Mon, 06 Feb 2017 09:17:39 -0500 Message-ID: References: <87o9ynarz3.fsf@tromey.com> <87fujs80fk.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486390687 12649 195.159.176.226 (6 Feb 2017 14:18:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 14:18:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 15:17:58 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cak7C-0002qw-AH for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 15:17:58 +0100 Original-Received: from localhost ([::1]:48205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cak7H-0007Rz-M8 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 09:18:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cak78-0007RM-3t for emacs-devel@gnu.org; Mon, 06 Feb 2017 09:17:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cak75-00025V-2s for emacs-devel@gnu.org; Mon, 06 Feb 2017 09:17:54 -0500 Original-Received: from [195.159.176.226] (port=52952 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cak74-00024R-TA for emacs-devel@gnu.org; Mon, 06 Feb 2017 09:17:51 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cak6v-00026F-88 for emacs-devel@gnu.org; Mon, 06 Feb 2017 15:17:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:bAAvq+Ro4fejS4Yv9nRPycpWUtk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212028 Archived-At: >> 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. Stefan