From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: CC Mode and electric-pair "problem". (Was: ... master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings.) Date: Thu, 31 May 2018 12:37:47 +0000 Message-ID: <20180531123747.GA24752@ACM> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527770354 29560 195.159.176.226 (31 May 2018 12:39:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 May 2018 12:39:14 +0000 (UTC) User-Agent: Mutt/1.9.4 (2018-02-28) Cc: Emacs developers To: Tino Calancha , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 31 14:39:09 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOMrF-0007Zo-6F for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 14:39:09 +0200 Original-Received: from localhost ([::1]:43895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOMtM-0005o7-8M for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 08:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOMtF-0005nz-Dp for emacs-devel@gnu.org; Thu, 31 May 2018 08:41:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOMt9-0006l6-TB for emacs-devel@gnu.org; Thu, 31 May 2018 08:41:13 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:62506 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1fOMt9-0006kM-Lg for emacs-devel@gnu.org; Thu, 31 May 2018 08:41:07 -0400 Original-Received: (qmail 80374 invoked by uid 3782); 31 May 2018 12:41:05 -0000 Original-Received: from acm.muc.de (p5B146B9D.dip0.t-ipconnect.de [91.20.107.157]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 31 May 2018 14:41:03 +0200 Original-Received: (qmail 24798 invoked by uid 1000); 31 May 2018 12:37:47 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:225846 Archived-At: Hello agin, Tino and Joćo. On Tue, May 22, 2018 at 16:42:46 +0900, Tino Calancha wrote: > Hi Alan, > Since this commit one test > (electric-pair-autowrapping-5-at-point-2-in-c++-mode-in-strings) > in electric-tests.el is failing with error: > (scan-error "Unbalanced parentheses" 6 1) This should now have been fixed. However, the test suite (make check) threw up another discrepancy, in a test called electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings. That's with electric-pair mode enabled, and electric-pair-skip-whitespace set to 'chomp. The buffer, at the start of the test, looks something like: " ( ) " . With point just after the (, type a ). The expected result is that everything up to and including the existing ) gets "chomped", leaving the buffer looking like: " () " . This no longer happens in C++ mode, and it is not clear that it should. In the original buffer, ( and ) are not in the same string, since the opening string ends at EOL, there being no backslash to continue it. If there were escaped newlines in the buffer, I don't think the "chomp" would work, because elec-pair.el doesn't recognise escaped newlines as whitespace. Comments? -- Alan Mackenzie (Nuremberg, Germany).