From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: html, css, and js modes working together Date: Mon, 6 Feb 2017 01:50:08 -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; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1486363822 29726 195.159.176.226 (6 Feb 2017 06:50:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 06:50:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: Emacs discussions To: Dmitry Gutov , Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 07:50:18 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 1cad7x-0007Sc-N1 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 07:50:17 +0100 Original-Received: from localhost ([::1]:45800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cad81-0002xb-Es for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 01:50:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cad7t-0002xW-Cx for emacs-devel@gnu.org; Mon, 06 Feb 2017 01:50:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cad7p-0006y4-I5 for emacs-devel@gnu.org; Mon, 06 Feb 2017 01:50:13 -0500 Original-Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:33276) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cad7p-0006xd-E3 for emacs-devel@gnu.org; Mon, 06 Feb 2017 01:50:09 -0500 Original-Received: by mail-qk0-x244.google.com with SMTP id 11so7219327qkl.0 for ; Sun, 05 Feb 2017 22:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=X1WKHA8OuC6+sNak2JsX43HOEQlfGhuaAkJydCiGcMQ=; b=YF1aGw3aEYRlSIj+RbxAHnYYwyZhS7yhLX++GgT1OTw6kn4BqjF6+ElzjjvGEI62aj J6iz2rqxbvNNLH5KE/xbHhWauotEnu4A5rENaEzjkx1C/xx93Ay1jiiOID7FK67IPF/J pW80aQXLfTpnIBPACHcZod1jPuInl1l8zTuoHiFWzoZExDni2Ku0ZZ2qbQtyIdY0uAeV Efy9uotr3svXG1kKwgLMCapkIhlOC9UPHk/Wvkk975eD1RPX2dzTvzxfiZRZVFNcsjcJ p9nVyJwbIH8emX2OdNQp64ikhy01vc7MQd7zfwwmeS/jmSyx7020IemxLBAvaVKS2sEL gJ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=X1WKHA8OuC6+sNak2JsX43HOEQlfGhuaAkJydCiGcMQ=; b=BD+FG+JMbWDPqfkXMh4yBvMqsSUTTfjgvorU2OUR2VLFIDQUb7NSWxG6i8TVUzooRi 484c2lAT7qLlihF0oRaPPIyxsf/w8ltT6Akgd+nPYLiYSdGq1eTSk/MDq0uhozJ5+zeF ABSIVRuTLJWsUYW0iWPt4e6o+pXCusMMDl4433lt4MwYDR15Jj2BFBRIYjn7cs147mrp KlXUVhV44R9d854HPkvT1v+tSmmWk1UWQSTsnYkixPI6w4tlq1rXCdaXnFbx03wohuly Oe34ZTQRnKYfj4NPThYl/9uEavPxM1Ei+ZSp7Dq2GcgDbMbb1/rkKG+qePN+bj+Euicm reLw== X-Gm-Message-State: AMke39lffdZ/9p+n/iz198dcRg5WEgbRXHhpVsc3D/zqzW3krvqCs63dTE+gePaFsXwqPQ== X-Received: by 10.55.69.72 with SMTP id s69mr8841728qka.21.1486363808885; Sun, 05 Feb 2017 22:50:08 -0800 (PST) Original-Received: from [18.189.115.217] (dhcp-18-189-115-217.dyn.MIT.EDU. [18.189.115.217]) by smtp.gmail.com with ESMTPSA id f35sm32153059qtb.49.2017.02.05.22.50.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 22:50:08 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::244 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:212019 Archived-At: On 2017-02-05 22:46, Dmitry Gutov wrote: > >> Yeah, what I mean is that font-locking does not occur, but it would be >> good to have. I couldn't find anything saying how this might be solved. >> I haven't come up with any really good ideas myself. Maybe font-lock >> could also look at text properties to decide what keywords to use? > > Here's one way to do it: https://github.com/purcell/mmm-mode/blob/master/mmm-region.el#L768-L787 Org-mode does it pretty well, too (see org-src-fontify-natively). For smaller snippets, see https://github.com/cpitclaudel/indirect-font-lock