From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#15207: 24.2; C Highlight colors around CV-modifiers Date: Sun, 1 Sep 2013 09:10:27 +0000 Message-ID: <20130901091027.GA2959__4999.61520913548$1378026751$gmane$org@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1378026742 7708 80.91.229.3 (1 Sep 2013 09:12:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Sep 2013 09:12:22 +0000 (UTC) To: 15207@debbugs.gnu.org, Gauthier ?stervall Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 01 11:12:25 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VG3hn-0007oA-Cw for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Sep 2013 11:12:23 +0200 Original-Received: from localhost ([::1]:33023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG3hm-0008Pe-UT for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Sep 2013 05:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG3he-0008O4-Eo for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2013 05:12:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VG3hY-00014P-OF for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2013 05:12:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG3hS-000138-Ea; Sun, 01 Sep 2013 05:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VG3hS-0000Tb-1N; Sun, 01 Sep 2013 05:12:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 01 Sep 2013 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15207 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 15207-submit@debbugs.gnu.org id=B15207.13780267121804 (code B ref 15207); Sun, 01 Sep 2013 09:12:01 +0000 Original-Received: (at 15207) by debbugs.gnu.org; 1 Sep 2013 09:11:52 +0000 Original-Received: from localhost ([127.0.0.1]:34175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VG3hH-0000T2-Rh for submit@debbugs.gnu.org; Sun, 01 Sep 2013 05:11:52 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:58592 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VG3hE-0000Sp-MA for 15207@debbugs.gnu.org; Sun, 01 Sep 2013 05:11:49 -0400 Original-Received: (qmail 8238 invoked by uid 3782); 1 Sep 2013 09:11:47 -0000 Original-Received: from acm.muc.de (pD9518B75.dip0.t-ipconnect.de [217.81.139.117]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Sep 2013 11:11:46 +0200 Original-Received: (qmail 3036 invoked by uid 1000); 1 Sep 2013 09:10:28 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77852 Archived-At: Hi, Gauthier. Gauthier ?stervall wrote: > C highlighting is not consistent depending on the placement of > CV-modifiers in variable declarations. > Example: > const type1 var1; > type2 const var2; > Both declarations are equivalent but the color of "type?" differs. > Issue verified in version 24.3 as well. Bug #15211 seems to be a duplicate of this bug. It's amazing how a bug like this can remain undetected for over a decade, then suddenly two people report it within a few hours of eachother. Would you please try out the patch from #15211, and let me know whether it fixes the bug, doesn't quite fix it, or there are unwanted side effects. Here it is again: diff -r 45df171f9859 cc-engine.el --- a/cc-engine.el Sat Aug 31 11:09:30 2013 +0000 +++ b/cc-engine.el Sat Aug 31 20:32:22 2013 +0000 @@ -7440,7 +7440,8 @@ ;; interactive refontification. (c-put-c-type-property (point) 'c-decl-arg-start)) - (when (and c-record-type-identifiers at-type (not (eq at-type t))) + (when (and c-record-type-identifiers at-type ;; (not (eq at-type t)) + ) (let ((c-promote-possible-types t)) (save-excursion (goto-char type-start) I'll just repeat what I said in #15211: the code in CC Mode took trouble to _exclude_ "type2" from being fontified, and I don't understand why. There may be side effects from this patch. Thanks for reporting this bug, and thanks for making it a high quality bug report. -- Alan Mackenzie (Nuremberg, Germany).