From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode Date: Mon, 08 Jul 2019 16:59:31 -0400 Message-ID: References: <20190703105804.GA11238@ACM> <20190704165846.GF5564@ACM> <20190704190100.GG5564@ACM> <20190708100539.GD4529@ACM> <20190708164501.GB5244@ACM> <20190708180551.GD5244@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134594"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= , emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 08 22:59:45 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkajh-000YtJ-5H for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2019 22:59:45 +0200 Original-Received: from localhost ([::1]:44716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkajg-0008FY-7K for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2019 16:59:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57963) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkajb-0008FS-My for emacs-devel@gnu.org; Mon, 08 Jul 2019 16:59:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkaja-00033Z-LE for emacs-devel@gnu.org; Mon, 08 Jul 2019 16:59:39 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40514) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkajY-00030L-Kz for emacs-devel@gnu.org; Mon, 08 Jul 2019 16:59:38 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C52661006CE; Mon, 8 Jul 2019 16:59:33 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 78D3A1004B0; Mon, 8 Jul 2019 16:59:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1562619572; bh=cfwCXuxmxWkoz4P7KiQ7NOUIp3p7V/M7Nlz87Ioh7KA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jER2D0Rv4otie9o3LRBK1VkVYCnIdT9cOnBu/BPxnCq4b8KxCVMPbkoj9GnS0YS03 UmgUXwEeJeShsA45u5AJmQGVEKLB5/1x9L1n0ZAwOzCtrfEHdNxNZVdCJ+B3Q9uhtV uNhznUpDQyxxPfBkGnN1y4qIoBzjH/nooSrS0UhNWuAP1tOGDFw4CmtPA84iWGeDtV 1SfLyCi2ho/RWDdepIiEIRxKSlvW7VeKh8uu5di5pXO0f7l0K1K9AIJpbRkNI8+LuU E4+55AJoa/Ak0so+vbIjei9u4iF6aEI9oNDEgijlNz8xkmMUccldJqsHGqK/qPtO7x 8pAStK+H0urtg== Original-Received: from alfajor (76-10-138-228.dsl.teksavvy.com [76.10.138.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 430AC12059A; Mon, 8 Jul 2019 16:59:32 -0400 (EDT) In-Reply-To: <20190708180551.GD5244@ACM> (Alan Mackenzie's message of "Mon, 8 Jul 2019 18:05:51 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:238416 Archived-At: >> > Don't knock it - it's working, and will give Jo=E3o what he wants whil= st >> > preserving correct fontification. >> Several people have already pointed out that what you call here "correct >> fontification" is "incorrect" in the cases where the error is a missing >> \ rather than a missing ". > "Several people" is just one that I have seen, and he is wrong. Jo=E3o gave you actual examples where fontifying the second line as a code rather than string was an error. So we're at least 2. > Whether > the error "is" a missing \ or a missing " (for whatever value of "is"), > the purpose of the fontification is to draw attention to this error. > This error is at the EOL where there is a missing " or \. In that sense > CC Mode's fontification of it is correct. Maybe we're not talking about the same thing: The addition of some kind of error/warning face on this line is indeed always correct and is something that can easily be done without any need to fiddle with syntax-table text properties. I'm definitely not arguing against this highlighting of the immediate error. But I'm talking about is the highlighting of the subsequent line(s). You seem to want them to be highlighted as if the next line was not part of a string (i.e. assume that a " was missing on the previous line), whereas all other major modes highlight that second line under the assumption that what was missing was a final \ on the previous line (or whatever other syntax the corresponding language requires). Both are wrong sometimes and right at other times. > How can you expect me to be other than adversarial when faced with such > an attitude? I guess I like to expect the unexpected ;-) Stefan