From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#36423: 27.0.50; electric-pair-mode not working properly depending of file content. Date: Mon, 8 Jul 2019 10:29:22 +0000 Message-ID: <20190708102922.GA25404@ACM> References: <20190628190131.w7ajdhaqqnmebewc@Ergus> <20190702133641.GA30699@ACM> <20190703193200.awabu3ell7vsrcpj@Ergus> <20190708094801.GC4529@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="148734"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 36423-done@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 08 12:30:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1hkQuR-000cXn-Hx for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 12:30:11 +0200 Original-Received: from localhost ([::1]:40252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQuQ-00070b-EW for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 06:30:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35671) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQuK-00070A-A3 for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 06:30:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkQuJ-0005D8-3Q for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 06:30:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkQuI-0005CE-QH for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 06:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkQuI-0007pd-Jg for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2019 06:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2019 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36423 X-GNU-PR-Package: emacs Original-Received: via spool by 36423-done@debbugs.gnu.org id=D36423.156258177230048 (code D ref 36423); Mon, 08 Jul 2019 10:30:02 +0000 Original-Received: (at 36423-done) by debbugs.gnu.org; 8 Jul 2019 10:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:57920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkQtn-0007oa-MO for submit@debbugs.gnu.org; Mon, 08 Jul 2019 06:29:31 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:23453 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hkQtk-0007oQ-Qh for 36423-done@debbugs.gnu.org; Mon, 08 Jul 2019 06:29:30 -0400 Original-Received: (qmail 45899 invoked by uid 3782); 8 Jul 2019 10:29:23 -0000 Original-Received: from acm.muc.de (p4FE15FEC.dip0.t-ipconnect.de [79.225.95.236]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 08 Jul 2019 12:29:22 +0200 Original-Received: (qmail 25446 invoked by uid 1000); 8 Jul 2019 10:29:22 -0000 Content-Disposition: inline In-Reply-To: <20190708094801.GC4529@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162321 Archived-At: Hello again, Ergus. On Mon, Jul 08, 2019 at 09:48:01 +0000, Alan Mackenzie wrote: > On Wed, Jul 03, 2019 at 21:32:00 +0200, Ergus wrote: > > Hi Alan: > > Sorry for the bother again. After the fix you did, the "" issue is > > better, but now there are new issues with the {} when I use pragmas for > > example. > OK, thanks! I've corrected a further problem with " in > electric-pair-mode, and I'm taking the liberty of closing your bug. ;-) > > I attached you a picture (because this is the easier way to explain it) > This is actually a different bug. If you haven't done so already, could > you please raise this as a bug in its own right. Thanks. Actually, there's no need for this, I understand what's happening now and it's "not a bug" - sort of. In the lines: 1. printf ("Hello 2. world"); , there is an invalid string on L1, extending from " to the end of the line. There is also an invalid string on L2, starting at the ", which encloses the ). Thus this ), being inside a string, can't match the ( on L1. Sorry I hadn't realised this half an hour ago. Due to insistent complaints, I'm looking at modifying this "invalid string" mechanism so that although it would fontify as it does now, it would allow things like these two parentheses to match up. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).