From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Regarding Emacs, js.el, template-strings and syntax-tables Date: Tue, 5 Sep 2017 02:40:59 +0300 Message-ID: References: <1503557767.41308.1083341824.4A2103C1@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504568500 24956 195.159.176.226 (4 Sep 2017 23:41:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Sep 2017 23:41:40 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: emacs-devel To: Anders Lindgren , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 05 01:41:26 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 1dp0zP-00051w-59 for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2017 01:41:11 +0200 Original-Received: from localhost ([::1]:56096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dp0zV-0006IZ-Tf for ged-emacs-devel@m.gmane.org; Mon, 04 Sep 2017 19:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dp0zL-0006IA-V2 for emacs-devel@gnu.org; Mon, 04 Sep 2017 19:41:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dp0zH-0003No-DN for emacs-devel@gnu.org; Mon, 04 Sep 2017 19:41:07 -0400 Original-Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:37722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dp0zH-0003N2-5Z for emacs-devel@gnu.org; Mon, 04 Sep 2017 19:41:03 -0400 Original-Received: by mail-lf0-x22b.google.com with SMTP id 80so943423lfy.4 for ; Mon, 04 Sep 2017 16:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3hPD6jPMPDBx9mSaSR/HBexNY0vKcfHC+O3JB/IBLiM=; b=UdZdE58ioeVTvT9i3NWmQIV+oZr9kAqioRgUqA+2THSvMSP6kas/8wgKV4ii5dquPs ezr59hgKB9V0ZQSl5HRTySM54sCYL09kzFmnsTBP0Ux1loG5s8SHVznoi7ZrUrF31kQE ylcoMGc6q4MDc0La2jXJUZY6J3/a8pGK6g9TBUQjb6kpbijpb8kIAdDX0V46lLypakx4 zzKA+OOk/E0CHo6USHqZt7xiZ4HadLMtvlR60erKWFuvXbHFNgMZnxV4XGZ78+QJhdsd dK6MG3cylTQiheN0dTrsWVMKi36wSJaaXBpUIyaaC1PkcS5PPTI6rsLqZkxJa4V0lQiw nQzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3hPD6jPMPDBx9mSaSR/HBexNY0vKcfHC+O3JB/IBLiM=; b=qp+Ez5Pejka1dRIHOsR/qFMP2IHCG0FGf2XTKgD58VT++y8V/rGlKn6jE1AEZN5kxu 1eIltzm5xKPenq0HXr/ASwRkDDwpknY81AXeS1CwUIhAGaBADEYu/kNOzOvQ12sA/z9f s6Yjq7q4tuNhZEwBSwCmFqK0FyLF1bQY2pnPp3DfqavEdTJ4HmNP52TZYqQfKn58fOo5 EZ90eMo9zcg6FuBSXoTqdvH64xz7TytTJHxTYXlZpzq87OjkHT8kAt/zPaAYlIy+0cCn 42SaFb1pbiFipxk6dSwrkSa8V+8FG1QQYIv9lcjMPnAl9LGk8Pj7v9WPeRkPEehuAr2L HRyw== X-Gm-Message-State: AHPjjUhmISboGHrRxGs+Re6bvaPXVbMLwWpiojvKcjKZ/QnfUSfAWYdd SY3W3LEcGNNqAJWCtQY= X-Google-Smtp-Source: ADKCNb5/Zo/XI4GNx8n1PH2H/R2LW/ZN9uU6zaDAxtoXH3r8EmSivIfP6L9blW9tZTfCbVQxPBcbGA== X-Received: by 10.46.64.216 with SMTP id r85mr710629lje.13.1504568461511; Mon, 04 Sep 2017 16:41:01 -0700 (PDT) Original-Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id a21sm280340ljf.27.2017.09.04.16.41.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2017 16:41:00 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22b 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:217933 Archived-At: On 8/24/17 3:31 PM, Anders Lindgren wrote: > If you use a string face with, say, both a background and a foreground > color, it will matter if you *replace* the existing face as opposed to > *prepend* a new face on top of it. > > For example, the default Ruby mode replace the face, That is a legacy behavior, as far as I'm concerned. In some other editors that I've looked at (e.g. Vim and either Sublime Text or Atom), the contents of the interpolation construct look like normal text. You can have nested strings and interpolations inside them, so it's a good semantic cue. > -------- > > One question is if the delimiters around the expression should be > highlighted as well? In Ruby they are highlighted. In my > cmake-font-lock[1] package I have opted not to highlight them, as it > makes it easier to read the variable name: If the contents are highlighted differently, the variable name will stand out just the same, even with the delimiters highlighted. > In all cases I've seen, the content is displayed using > `font-lock-variable-name-face', even for the cases where the content is > more complex than a plain variable. I would say that this is OK, as they > stand out and, most of the time, it is a plain variable anyway. We don't use font-lock-variable-name-face for "plain variables" outside of strings, though. Not in ruby-mode, at least.