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: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode Date: Thu, 04 Jul 2019 11:52:32 -0400 Message-ID: References: <20190702131632.GA30597@ACM> <20190702160410.GB30597@ACM> <20190702182811.GC30597@ACM> <20190703105804.GA11238@ACM> <20190704152451.GD5564@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="216239"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 04 17:53:47 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 1hj43O-000u9R-I6 for ged-emacs-devel@m.gmane.org; Thu, 04 Jul 2019 17:53:46 +0200 Original-Received: from localhost ([::1]:47146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj43N-0001eD-J8 for ged-emacs-devel@m.gmane.org; Thu, 04 Jul 2019 11:53:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41966) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj42I-0001ba-RD for emacs-devel@gnu.org; Thu, 04 Jul 2019 11:52:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj42H-0001hd-QD for emacs-devel@gnu.org; Thu, 04 Jul 2019 11:52:38 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51545) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hj42H-0001gb-Jc for emacs-devel@gnu.org; Thu, 04 Jul 2019 11:52:37 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 262EC100944; Thu, 4 Jul 2019 11:52:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E80A1100870; Thu, 4 Jul 2019 11:52:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1562255553; bh=dyKmTJRabn1EHV0wS0/PCl76ex4Inqi4wzwMQSGxy2w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Vyrkx/m/nw2a1G6Yge6TCxhXiYezQKh61CNmm6X8wKkcpB1WkNZdyOPYrAki+gaGh flnZz2hPtE5WDLIL2vtBZZ/zeBDIYVpb5sL21e9ZWEXyDOTvjJ2kWON4jYN9DnQnZa 1pNASQ0daR07FRz1r6pH28k/F9eGToDtAmTOfOvavdLQx8dl99IPCWnUz61jiTnuWr O+uCtQLuyuaKLPblwoB8acBxnEv6dlP/R4XwahGGBF490+AY9mX55HYCVLTH9CrNsZ k7Cr7OS50+fcuAHDP5EIWp0ST1e2VJDQyD+TnEGCL2hy27KOEfoOlKO0dcj+mO6D7Z VIBimQIC/9XSQ== Original-Received: from pastel (76-10-141-139.dsl.teksavvy.com [76.10.141.139]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BA95B1206EB; Thu, 4 Jul 2019 11:52:33 -0400 (EDT) In-Reply-To: <20190704152451.GD5564@ACM> (Alan Mackenzie's message of "Thu, 4 Jul 2019 15:24: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:238355 Archived-At: Hi Alan, > Thanks. That's part of the problem. Another part is that syntax > fontification will have wrongly fontified the bits beyond the end of the > invalid string with font-lock-string-face. We've gone through that several times already. We don't and can't know if it's wrong or not, because it depends on what is the error: is there a missing closing " on the line, or should the newline be preceded by \ ? So no matter which behavior we choose to use, it will sometimes be wrong, and the frequency of which is right and which is wrong completely depends on things like the age of the captain. You decided to expend a lot of efforts on implementing a differently-wrong behavior than the default wrong behavior, breaking long standing useful wrong behavior along the way. That's your prerogative. But it's still wrong anyway because there can be no right behavior here. Stefan