From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode Date: Mon, 8 Jul 2019 13:10:45 +0100 Message-ID: References: <20190702160410.GB30597@ACM> <20190702182811.GC30597@ACM> <20190703105804.GA11238@ACM> <20190704165846.GF5564@ACM> <20190704190100.GG5564@ACM> <20190708100539.GD4529@ACM> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002c3b51058d2a56d4" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="60432"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 08 14:19:34 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 1hkScH-000FYJ-IN for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2019 14:19:33 +0200 Original-Received: from localhost ([::1]:41198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkSVK-0005NG-3V for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2019 08:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59075) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkSU6-0005JM-Vm for emacs-devel@gnu.org; Mon, 08 Jul 2019 08:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkSU5-0001bp-0G for emacs-devel@gnu.org; Mon, 08 Jul 2019 08:11:06 -0400 Original-Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]:37078) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkSU2-0001XS-MJ for emacs-devel@gnu.org; Mon, 08 Jul 2019 08:11:03 -0400 Original-Received: by mail-io1-xd42.google.com with SMTP id q22so12818168iog.4 for ; Mon, 08 Jul 2019 05:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uqgAkN4N0NvWFSUEW1Glx/COjfNj043d0ve++OX01UY=; b=sB3raPNsyPCT0nycWNh5bbm5wsZHwqME4CN9DnQhfvy857LYSdrr+fmSf1W+cyvAOg cz7sA8LB6DRL3RHaxYPuk1x1pmr3EZr1ZogTWfFf/9Ke4ZSjgsrVgoma0JMVpZEOinCv 1SwvorHfhQTiRuj9ANt6mExXyufeAklpuFz4ulMRjlSovmhuHenq6vMYZD9vlcEULNz8 WVj/yI7InAYc98vBofn+B5b5X8JQlCGyjODalkuAxiYse20KtqrvltuLd7uTmFoHH/6M jYVXCDQPRFrSDmWPap0ZKWK6aW0/CY5r+pD1qehttTN9KYQIZTWkk6mIbQSKOWYPdHkK 5WWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uqgAkN4N0NvWFSUEW1Glx/COjfNj043d0ve++OX01UY=; b=G1HgEsG2knN4TNZ7ShhGXVgXeWRbnV/dtcH9OLZ4dItaUgNgO3zpbpy8R7D0d2Nw6m aCqISI4LOq0beMlK5xqcF6/vBWvbZnpXfUEv7Isdg3zCFpJWnmlCh2oeEFlbvYNggO23 /9kRw6TpmLuAfwRxYK1Qt2ghbgrd7xgT5JVDeLcjceeCcfYtdqRaQHfPO58BHdelLdq6 MU8I4WqIdqHR2L3pDDzSx/ZLuoSdnsryCpZSS6L7iXo1lhoEv0B1yIK+d5jW6bJACiAQ aJcX3rQ9TbBFiSQX1lTQ2SJD7GHg9comeo9lUpL1yXhrFoTgYidcxCd46bz0xHiDKtJF XWpg== X-Gm-Message-State: APjAAAX4/fusYJPLdmpX/kn95jNXSnOHbltMlo5Sj0Y6x1ldER/p7vsi DhaV5jBISilN16POsRfNQ+vHVswsWqpjuMXCKa1w0asb0F4= X-Google-Smtp-Source: APXvYqz3FSnEYI0UO2X6SCv9npjMgQDckeu6pWChp/ThhKvr8Ex1oRlIpRlFx53TrS5W/EdE+jJZfDGCwJwswPS3fvw= X-Received: by 2002:a5d:8416:: with SMTP id i22mr9901875ion.248.1562587857433; Mon, 08 Jul 2019 05:10:57 -0700 (PDT) In-Reply-To: <20190708100539.GD4529@ACM> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d42 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:238404 Archived-At: --0000000000002c3b51058d2a56d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 8, 2019 at 11:05 AM Alan Mackenzie wrote: > I have an idea how to make C-M-* work in these bogus multi-line strings, > but it's going to take more than a couple of days to implement. It > involves only having the pertinent string fence syntax-table text > properties present during fontification and CC Mode's > before/after-change-functions. No idea if that approach has any pitfalls, but if it doesn't, it's a good bet that you won't need the electric-pair-inhibit-predicate tweak you just committed. You'll probably also unbreak a C++/electric-pair test, bringing back cc-mode closer to what is was before the pursuit of these new fontification features. Nevertheless I think you should heed Stefan's advice. It should give you all of the above (invalid string indicator included), with much less code and hassle, and you can use string fences some other time. Jo=C3=A3o --0000000000002c3b51058d2a56d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jul 8, 2019 at 11:05 AM Alan Mackenzie <acm@muc.de> wrote:
=C2=A0
> I have a= n idea how to make C-M-* work in these bogus multi-line strings,
> bu= t it's going to take more than a couple of days to implement.=C2=A0 It<= br>> involves only having the pertinent string fence syntax-table text> properties present during fontification and CC Mode's
> be= fore/after-change-functions.

No idea if that approach has any pitfal= ls, but if it doesn't, it's a good
bet that you won't need t= he electric-pair-inhibit-predicate tweak
you just committed. You'll = probably also unbreak a
C++/electric-pair test, bringing back cc-mode cl= oser to what is was
before the pursuit of these new fontification featur= es.

Nevertheless I think you should heed Stefan's advice. It sho= uld give
you all of the above (invalid string indicator included), with = much
less code and hassle, and you can use string fences some other time= .

Jo=C3=A3o
--0000000000002c3b51058d2a56d4--