GNU bug report logs - #33163
Adding a " in c++-mode fills the whole file with red

Previous Next

Packages: cc-mode, emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Fri, 26 Oct 2018 14:06:01 UTC

Severity: minor

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#33163: closed (Adding a " in c++-mode fills the whole file
 with red)
Date: Tue, 30 Oct 2018 12:02:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 30 Oct 2018 12:01:32 +0000
with message-id <20181030120132.GA16181 <at> ACM>
and subject line Re: bug#33163: Adding a " in c++-mode fills the whole file with red
has caused the debbugs.gnu.org bug report #33163,
regarding Adding a " in c++-mode fills the whole file with red
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
33163: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33163
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Adding a " in c++-mode fills the whole file with red
Date: Fri, 26 Oct 2018 17:05:04 +0300
This long-standing problem appears occasionally, and only disappears if you kill the buffer completely, then reopen the file. I never got to report it because I never could find steps to reproduce it… until now :) Nvm the non-sense code, I reduced testcase as far as I managed.

# Steps to reproduce:

1. Save the following text in `test.cpp`
    int main() {
            puts(It's");
        auto foo = []()-> void {  };
            puts("It's");
    }
2. Open `emacs -Q ./test.cpp`
3. Now, the text lacks a quote in the first `puts(It's");`. Add it so it looks like `puts("It's");`. Essentially, if you'd compile it with g++, it lacks any syntax error besides `puts` being undeclared.

# Expected

The line with `auto foo…` is not red.

# Actual

The line with `auto foo…` (in particular) becomes red.

# Additional information

Emacs version GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-10-01, build with -flto.


[Message part 3 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>
Cc: 33163-done <at> debbugs.gnu.org
Subject: Re: bug#33163: Adding a " in c++-mode fills the whole file with red
Date: Tue, 30 Oct 2018 12:01:32 +0000
Hello, Konstantin

On Mon, Oct 29, 2018 at 21:46:50 +0300, Konstantin Kharlamov wrote:
> Thank you, so, I've used the patch today for working with a code, and 
> everything seemed to be well :)

> Tested-by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Thanks for the testing.  I've committed the patch to all the usual
places, and I'm closing the bug.

-- 
Alan Mackenzie (Nuremberg, Germany).


This bug report was last modified 6 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.