From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Jostein=20Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: Regarding Emacs, js.el, template-strings and syntax-tables Date: Thu, 24 Aug 2017 14:17:51 +0200 Message-ID: <1503577071.101466.1083595896.28A29955@webmail.messagingengine.com> References: <1503557767.41308.1083341824.4A2103C1@webmail.messagingengine.com> <1503576818.100758.1083575560.7079FD9A@webmail.messagingengine.com> Reply-To: jostein@kjonigsen.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_----------=_15035770711014662" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1503577274 28930 195.159.176.226 (24 Aug 2017 12:21:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 12:21:14 +0000 (UTC) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 14:21:09 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 1dkr88-0006pB-85 for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 14:21:00 +0200 Original-Received: from localhost ([::1]:48348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkr8F-0001Li-0K for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2017 08:21:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkr5B-0008Ap-46 for emacs-devel@gnu.org; Thu, 24 Aug 2017 08:17:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkr57-0001Ef-1G for emacs-devel@gnu.org; Thu, 24 Aug 2017 08:17:57 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:52529) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkr56-0001EK-T1 for emacs-devel@gnu.org; Thu, 24 Aug 2017 08:17:52 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 01CE120AC6; Thu, 24 Aug 2017 08:17:51 -0400 (EDT) Original-Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Thu, 24 Aug 2017 08:17:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-transfer-encoding :content-type:date:from:in-reply-to:message-id:mime-version :references:reply-to:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=zGaZezY9r/nXiDDiveg9PJE6vEDCnBYJy9q8v9qPX vI=; b=VHexNG07BO7yccye4E+ePUHHAkrTuy7HH05vKLaof+1C9ISDpUIAX8imu IAEyocKIL+SFJ/d84y5VeR2RUdbxm1s2S02sKpkBCaV5CeOIKMVt7VBd14l02PcU KrpXgOLHVRhAwQjksU2+LM640+3wzq80DLrzPVWYlPKmDlyvJBs0bhCjeuWvgdN2 Vds3KmDJZpaJBhKaZVi0ALPD8V9QYkCJ2akliw3osAKJGXZIqLNAxyEEwIw+HCFd fYUTvRzRPdSL9kFlROBRM1VrVJslhAng6/xK5pQMrf5fF1+8uwnm6MfkTtTFx6e9 o/U6AISJ6F25Y60X4UADr0n0uzmig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zGaZezY9r/nXiDDiveg9PJE6vEDCnBYJy9q8v9qPXvI=; b=Pe3/foEnTL17 dowEIRWnk+y1SvE2jxk9I7pm9vIhqSCyQr/OU/ohADzwYDu2wy7JtSoZojN7gw9z ls4iDgVeSQsCv7hDLlupWsximqeU6lforixEFJLs6FtAd2TqG/P+adwCc+4MNp7v i/h5/Tmr5LJImDkRkdM8HgaaspOBh4Wsb3SGLZ7mQ2+TkDMimks93V5WGBMIqm+O aKMYUk8jzQ+DTHv/3N0VC9I1BW2K3+65pIFjLrsjzmt2FiWOSrLX4gmI7/ePm8VZ RV09ILd3QfnpLKOeZpDWLcNA9014Yhazdm8smFflHW4NNEDdHYWMyHRUL9urDgWB ustvCuwqNQ== X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id C76B79E2E8; Thu, 24 Aug 2017 08:17:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface - ajax-13b5a8c9 In-Reply-To: <1503576818.100758.1083575560.7079FD9A@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.26 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:217758 Archived-At: This is a multi-part message in MIME format. --_----------=_15035770711014662 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" > In sh-script, we use syntax-propertize to make sure the whole > string and> its contents is all considered as a string and nothing else. = This was> the simplest solution and probably corresponds to the current be= havior> of js.el (and typescript.el) as well. I'd also like to add that I've been told syntax-propertize is a property of font-lock and relying on it for correct operation on syntax-tables is ... not entirely guaranteed. Basically, if a user disables font-lock for whatever reason (maybe scripted automation?), you can no longer rely on the syntax-properties to be correct. It might be a bigger problem in theory than in practice, but again it represents yet another *inaccuracy* in the syntax-model and analysis of it. It would be nice to get this stuff cleaned up. -- Jostein Kj=C3=B8nigsen --_----------=_15035770711014662 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

In sh-script, we use syntax-proper= tize to make sure the whole string and
its contents is all considered as a string and nothing else.  Thi= s was
the simplest solution and probably corresponds to the current behavior=
of js.el (and typescript.el) as well.

I'd also like to add that I've been told syntax-propertize is a proper= ty of font-lock and relying on it for correct operation on syntax-tables is= ... not entirely guaranteed.

Basically, if a user disables font-lock for whatever reason (maybe scr= ipted automation?), you can no longer rely on the syntax-properties to be c= orrect.

It might be a bigger problem in theory than in practice, but again it = represents yet another inaccuracy in the syntax-model and analysis o= f it.

It would be nice to get this stuff cleaned up.

--
Jostein Kj=C3=B8nigsen



--_----------=_15035770711014662--