From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: "enum class" supports for cc-mode Date: Wed, 29 Oct 2014 17:02:28 +0000 Message-ID: <54511DA4.4060002@dancol.org> References: <544E9099.7030409@dancol.org> <20141029164915.GC2953@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uNuRuw5puGC3tMUehCxqJ2ATD7UNRgNXw" X-Trace: ger.gmane.org 1414602208 5268 80.91.229.3 (29 Oct 2014 17:03:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2014 17:03:28 +0000 (UTC) Cc: Emacs developers To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 29 18:03:22 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XjWeX-0000ju-AE for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 18:03:21 +0100 Original-Received: from localhost ([::1]:47819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWeW-0007rv-Ss for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 13:03:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWe9-0007hb-1i for emacs-devel@gnu.org; Wed, 29 Oct 2014 13:03:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjWdw-000442-8d for emacs-devel@gnu.org; Wed, 29 Oct 2014 13:02:57 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:56945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWdv-00042e-Ug for emacs-devel@gnu.org; Wed, 29 Oct 2014 13:02:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=AIL66JS2W1+01vh2KQd7LBiSwJaiIC0Gq+hq3onXnOk=; b=YGblvVl1TLsb3Pl68UZWVlr9Z1smfkMR1CRrIhtLHSK5HNL2JRguw6EQu3Lu378a6wm86Dfhz6cicmqJUBF9fz5bLL/QE97NabTMdO8P5sMU8PssSYHmrMSMk+HA4il1z1Nmf/VkoLL+nnAuL2tcjUbVde2yW5nHtJMATo2Sf/L8aCYrB/5mH0IsgkKjB/pRpK5YgZl9XIisavcm3Pd8d1t1g1fmfBMZ7s4JNY69V+PrgXNHCq3xwZJ3ycIOTW/KoChQJzv/GRrJyD+OqHJ24GeSYHDbY9cQEpvx/PI/IgdNOOGNrPbX2ip0PUBnVL9+QNKjdlJbfCeO2LP5P8DmBw==; Original-Received: from [195.89.19.114] (helo=[172.17.182.184]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1XjWdp-0006HI-39; Wed, 29 Oct 2014 10:02:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <20141029164915.GC2953@acm.acm> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176023 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uNuRuw5puGC3tMUehCxqJ2ATD7UNRgNXw Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/29/2014 04:49 PM, Alan Mackenzie wrote: > Hi, Daniel. >=20 > On Mon, Oct 27, 2014 at 06:36:09PM +0000, Daniel Colascione wrote: >> Here's a small patch that teaches cc-mode about C++11 "enum class" syn= tax. >> See http://msdn.microsoft.com/en-us/library/2dzy4k6e.aspx >=20 >> Alan, can you take a look? >=20 > Thanks for this, it looks good. I'll definitely install it (with prope= r > attribution). Thanks. > Just one or two little details: > (i) You've used `eql' rather than `eq' for comparing things in a few > places. Is there any reason for this? eql is a good habit for numbers; =3D and eq would work just as well in these contexts though in Emacs. > (ii) c-after-brace-list-key will be "\\<\\>" (not nil) for non-C++ > languages, I think. It's definition in cc-langs.el needs tweaking a > bit to make it nil. Good point. Would you mind making this change? > (iii) There's a question as to whether the backward searching in > c-backward-colon-prefixed-type should have an optional search limit. > But the existing c-backward-over-enum-header doesn't, so that's > something new to think about. I figure that the search will stop soon enough when we come across a token that can't be part of the enum header. Placing a generically correct bound on it seemed hard. --uNuRuw5puGC3tMUehCxqJ2ATD7UNRgNXw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUUR2kAAoJEN4WImmbpWBlwcsP/R4xfKcj0iMqdxfkxauPspy1 mRGkXU3qlXhTRV3Y4huIUAY4S6bg9yGEGKcXQIDv+ICoj5+bApRVEYHp5IJRQGY/ cE+pl22qzYyPST9TPMbCrisn3xTn8F4fl6gKEjyi88aCzoG0zhLIHd1b28vNylna /+hgeGB5kLBJzENMtty8j/hppNK04P3iXgIf5co4HdluMXidzuDS2TaWK/pOm3np jl9IFbTXXTHb9ILRSvGrUgaEHfbEELljpx7DIaZx6qrXNwQ/YuXiE0npcExQ2H8d zhZag5MeUVrC59biVcj2bypZ6nTXpmWMZVBBBOv7TzGYQQSScCc8SBCvhzhny5WH OArmaCcOUojAwFMirMRpKUy714nZWp2n1aStq8A5Yzv90QV/gAU+9+Clh5npNkLm Q2hymdV85A6ZT2VQkQD7brlGPzecsHoLNt+EdzznTlgHICVKixKJ63vtipzV+VzQ MBXGoYwB1C3qlEolWRgV8tRP2NBnsWigmEs7msEzsgOWt5a92lfCBioqkrMJbuGl 3shHPah36yplxIi+eoKxnK53khNkquvd/x8HqVCCyGCwNbxGyLbENU4VASSQBNjM bhZp1ZJ9/TqrbI6xLsFBVLzPw9kC3h/lChkTZGYtFgnHsMgvtw1ppT9y4lRfdioo R3fJpDkktW5O9FmyJKgH =72nL -----END PGP SIGNATURE----- --uNuRuw5puGC3tMUehCxqJ2ATD7UNRgNXw--