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: Re: Fix to handling of C++ digit separators, improvements in handling of single quotes. Date: Sun, 2 Jul 2017 06:03:37 +0000 Message-ID: <20170702060337.GA2439@acm> References: <20170701161008.GB8743@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1498975501 11669 195.159.176.226 (2 Jul 2017 06:05:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Jul 2017 06:05:01 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 02 08:04:58 2017 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 1dRY07-0002jj-Gy for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 08:04:55 +0200 Original-Received: from localhost ([::1]:56877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRY0C-0001bE-TX for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 02:05:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRY06-0001b7-UR for emacs-devel@gnu.org; Sun, 02 Jul 2017 02:04:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRY03-00071G-Or for emacs-devel@gnu.org; Sun, 02 Jul 2017 02:04:54 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:33873 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1dRY03-00070Q-Bk for emacs-devel@gnu.org; Sun, 02 Jul 2017 02:04:51 -0400 Original-Received: (qmail 45452 invoked by uid 3782); 2 Jul 2017 06:04:49 -0000 Original-Received: from acm.muc.de (p548C7A89.dip0.t-ipconnect.de [84.140.122.137]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 02 Jul 2017 08:04:48 +0200 Original-Received: (qmail 2482 invoked by uid 1000); 2 Jul 2017 06:03:37 -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.4 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:216086 Archived-At: Hello, Noam. On Sat, Jul 01, 2017 at 23:35:41 -0400, Noam Postavsky wrote: > On Sat, Jul 1, 2017 at 12:10 PM, Alan Mackenzie wrote: > > The code involved is moderately involved, with special cases needed to > > handle things like '\'', '\\', or char foo [] = {',',',',',',','};. So > > if there are any problems with it (in particular, large areas of text > > following a quotey bit getting misfontified with font-lock-string-face), > > please let me know. > I think this change breaks tests/lisp/electric-tests.el, here's a > reduced test case (backtrace attached) > (with-temp-buffer > (c++-mode) > (insert " (((()) ") > (goto-char 4) > (insert ")")) Yes. Sorry about that. The problem is in c-quoted-number-head-before-point, where I've used (match-beginning 0) without first checking that a search was successful. In effect, I was using an uninitialised variable. I'll fix it later on today, when I've got a clearer head and plenty of time. -- Alan Mackenzie (Nuremberg, Germany).