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#23610: 25.0.94; c++-mode doesn't fontify typename... like typename Date: Thu, 30 Jun 2016 14:36:36 +0000 Message-ID: <20160630143636.GD3082@acm.fritz.box> References: <20160619211440.86830.qmail@mail.muc.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467297461 6818 80.91.229.3 (30 Jun 2016 14:37:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 14:37:41 +0000 (UTC) Cc: 23610@debbugs.gnu.org To: Ivan Andrus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 30 16:37:30 2016 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 1bId5o-0006bm-IT for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 16:37:24 +0200 Original-Received: from localhost ([::1]:50660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bId5n-0007Ed-S4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 10:37:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bId5W-00076j-UH for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 10:37:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bId5V-0002jg-Ph for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 10:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bId5S-0002jO-AU; Thu, 30 Jun 2016 10:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bId5S-0000d1-05; Thu, 30 Jun 2016 10:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 30 Jun 2016 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23610 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 23610-submit@debbugs.gnu.org id=B23610.14672973912370 (code B ref 23610); Thu, 30 Jun 2016 14:37:01 +0000 Original-Received: (at 23610) by debbugs.gnu.org; 30 Jun 2016 14:36:31 +0000 Original-Received: from localhost ([127.0.0.1]:60959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bId4w-0000cA-Q1 for submit@debbugs.gnu.org; Thu, 30 Jun 2016 10:36:30 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:10804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bId4v-0000c0-2E for 23610@debbugs.gnu.org; Thu, 30 Jun 2016 10:36:29 -0400 Original-Received: (qmail 44000 invoked by uid 3782); 30 Jun 2016 14:36:27 -0000 Original-Received: from acm.muc.de (p4FC460AB.dip0.t-ipconnect.de [79.196.96.171]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 30 Jun 2016 16:36:26 +0200 Original-Received: (qmail 5763 invoked by uid 1000); 30 Jun 2016 14:36:36 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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.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:120227 Archived-At: Hello, Ivan. On Wed, Jun 22, 2016 at 09:22:01AM -0600, Ivan Andrus wrote: > On Sun, Jun 19, 2016 at 3:14 PM, Alan Mackenzie wrote: > > In article you wrote: > >> Starting with emacs -Q, Y is not fontified in the snippet below, whereas > >> X is. > >> -Ivan > >> template > >> class bob { > >> }; > > [ .... ] > > The following patch is a first attempt to fontify parameter packs. After > > applying it, please be sure either to recompile CC Mode entirely, or > > first to compile cc-langs.el (which contains macros), and then all three > > of cc-fonts.el, cc-engine.el, and cc-mode.el. > > It seems to fontify the "Y" above OK. I've tried it on a stock example > > out of Wikipedia, and that works. Could you try it out on your code, > > please, and let me know how well it works. > It looks pretty good. I didn't notice this before, but the following example > from Wikipedia is fontified differently if the ... is removed from before the > `args`. In that case args is fontified with `font-lock-variable-name-face`. > template inline void expand(Args&&... args) { > pass( some_function(args)... ); > } What is this "&&" operator? It cannot be a logical and, and doesn't look like anything to do with a move constructor. I've tried, and failed, to find an explanation in http://en.cppreference.com/w/cpp/language. I didn't find and explanation in the article "variadic templates" in wikipedia either. A pointer to a web page explaining it would be much appreciated. I'm tempted to commit the patch as it is at the moment, but feel I ought to understand this "&&" first. > FWIW, I've seen similar mis-fontifications before (without ...) and it hasn't > bothered me too much. I just found a reproducible case, so I guess I'll > open a bug for it. > Thanks for working on this. The raw string support is awesome! Thanks! There've recently been one or two bugs fixed for raw string support. The corrections are in the Emacs master branch. > -Ivan -- Alan Mackenzie (Nuremberg, Germany).