From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Date: Sat, 31 Oct 2020 09:20:12 -0400 Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33560"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 39277-done@debbugs.gnu.org, Hadrien Lacour To: mvar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 31 14:21:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYqor-0008d3-Ic for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 14:21:21 +0100 Original-Received: from localhost ([::1]:49344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYqoq-0004fX-Go for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 09:21:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYqoZ-0004eL-4l for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:21:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYqoY-0000HK-J2 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYqoY-0004wM-Em for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 39277-done@debbugs.gnu.org id=D39277.160415042218920 (code D ref 39277); Sat, 31 Oct 2020 13:21:02 +0000 Original-Received: (at 39277-done) by debbugs.gnu.org; 31 Oct 2020 13:20:22 +0000 Original-Received: from localhost ([127.0.0.1]:60698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqnu-0004v6-1t for submit@debbugs.gnu.org; Sat, 31 Oct 2020 09:20:22 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqns-0004up-CV for 39277-done@debbugs.gnu.org; Sat, 31 Oct 2020 09:20:21 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DB7CF80B13; Sat, 31 Oct 2020 09:20:14 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7BC058096B; Sat, 31 Oct 2020 09:20:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604150413; bh=uN5j8j/7AR1Jg6Bl8EYAmDw3NzGSuGlnboxleksCGSo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iV0EfSOicbu6iAqJi4U8tJzjUWpTrbx55DNspJu1P/XHzn07v2pgI3Y7u94jKRh/I zxXZ6ELtGT4n9LLx052xk1z4aVlnpUM/AKjBEoN0HvUKQeZsYp7P3MMlimbsqdGdVT vf+UFuj8ycHYe2m4/OaFKdJSoBLfktuAjCZnqbPnZLX22K8YD/FaeDE5yMK6Ty0/Gb mlNG0IlAYZZaGPb+3Fdar+S0FDn82MGm6fPUayuOhrhyw+ktE9ZtYJ6iolWEfbsogJ EIlNdaBgu3UVf4b+zbjjE0joTJ67hmk0YG+HgxT6YiA8Sl+ERIGol7zlkuVOb43Dnc x6cmQvRFlOmPg== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D416120468; Sat, 31 Oct 2020 09:20:13 -0400 (EDT) In-Reply-To: <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Sat, 31 Oct 2020 13:01:08 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192267 Archived-At: > apologies for late reply, No need to apologize, and it's been less than 4 days, so it's definitely not late. > I needed a couple of days to work with the patched tcl.el in my > (disgustingly large) tcl codebase to be sure nothing breaks & can > confirm now. Great, thanks! > The original case is solved > (although the enclosed {"string} is not font-locked as string but I > wouldn't consider it an error) Yes, this is a separate problem and I can't see how to fix it: since "everything's a string" in Tcl, it's really not clear what `font-lock-string-face` should apply to and what it shouldn't apply to. The current design is to use it only where "..." is used. When the code is fully under your control it lets you choose (to some extent at least) what is highlighted and what is not (by choosing "..." vs {...}), but clearly it won't be "right" in all cases. > plus it fixes the following: > > proc foo4 () { > puts "hello}" > } > > this was marked as valid before your changes but tclsh won't accept it > as such - the bracket } inside the string needs to be escaped when > inside a proc context (but as a plain statement there's no such > requirement). Indeed. Stefan