emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix to handling of C++ digit separators, improvements in handling of


From: Alan Mackenzie
Subject: Re: Fix to handling of C++ digit separators, improvements in handling of single quotes.
Date: Sun, 2 Jul 2017 06:03:37 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

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 <address@hidden> 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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]