From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24271: 25.1; font-lock problem of c++-mode Date: Sat, 20 Aug 2016 09:56:41 +0300 Message-ID: <83twegc4ie.fsf@gnu.org> References: <7756A5F1-342F-4F55-8D6B-1A41B528DE5A@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1471676239 12778 195.159.176.226 (20 Aug 2016 06:57:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 Aug 2016 06:57:19 +0000 (UTC) Cc: 24271@debbugs.gnu.org To: Jiajian Huang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 20 08:57:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bb0DS-000380-C7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Aug 2016 08:57:14 +0200 Original-Received: from localhost ([::1]:60079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb0DP-0002Xv-Ck for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Aug 2016 02:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb0DJ-0002X5-PY for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2016 02:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bb0DG-0005xg-LY for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2016 02:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb0DG-0005xc-IU for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2016 02:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bb0DG-0001Dc-DR for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2016 02:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Aug 2016 06:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24271-submit@debbugs.gnu.org id=B24271.14716762054661 (code B ref 24271); Sat, 20 Aug 2016 06:57:02 +0000 Original-Received: (at 24271) by debbugs.gnu.org; 20 Aug 2016 06:56:45 +0000 Original-Received: from localhost ([127.0.0.1]:34642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb0Cz-0001D7-9S for submit@debbugs.gnu.org; Sat, 20 Aug 2016 02:56:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb0Cx-0001Cu-OF for 24271@debbugs.gnu.org; Sat, 20 Aug 2016 02:56:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bb0Co-0005tQ-OW for 24271@debbugs.gnu.org; Sat, 20 Aug 2016 02:56:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb0Co-0005tG-LK; Sat, 20 Aug 2016 02:56:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1076 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bb0Cm-0000rX-NT; Sat, 20 Aug 2016 02:56:33 -0400 In-reply-to: <7756A5F1-342F-4F55-8D6B-1A41B528DE5A@gmail.com> (message from Jiajian Huang on Sat, 20 Aug 2016 08:42:43 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122403 Archived-At: > From: Jiajian Huang > Date: Sat, 20 Aug 2016 08:42:43 +0800 > > I recently notice that there's some strange behaviours of the font-lock of the c++-mode. I don't see it as strange. > Let's start emacs by `emacs -Q` in the terminal, edit a new file `test.cpp` and save the following contents > > Then put the cursor two lines above the `int main` line, type `int test`, you will find that the color of word `main` changes from *blue* to *black* > > Backspace the current line to `in` or `i`, you will see that the color of `main` change back to *blue* When you insert "int test", without the semi-colon, your buffer now has an invalid C++ program, so it's a small wonder the colors change. When you replace "int test" with "in test", the "in" part is no longer a C++ type, so it's again small wonder that colors change. > Is this a emacs bug ? I don't think it's a bug. Thanks.