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: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: 33163 <at> debbugs.gnu.org
Subject: bug#33163: 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.




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

Previous Next


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