From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgwNH-0005k0-H0 for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgwNE-0000NJ-MG for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:59:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgwNE-0000N4-FZ for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:59:20 -0400 References: <1443497249-15361-1-git-send-email-eblake@redhat.com> <1443497249-15361-13-git-send-email-eblake@redhat.com> <87a8s5ib1t.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <560AA740.1080208@redhat.com> Date: Tue, 29 Sep 2015 08:59:12 -0600 MIME-Version: 1.0 In-Reply-To: <87a8s5ib1t.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="djGemSEiP23QCAiBpt2DWWhPPFE5BVBRQ" Subject: Re: [Qemu-devel] [PATCH v6 12/16] qapi: Consistent generated code: prefer common labels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: marcandre.lureau@redhat.com, Michael Tokarev , qemu-devel@nongnu.org, ehabkost@redhat.com, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --djGemSEiP23QCAiBpt2DWWhPPFE5BVBRQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/29/2015 07:56 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> We had some pointless differences in the generated code for visit, >> command marshalling, and events; unifying them makes it easier for >> future patches to consolidate to common helper functions. >> >> This is patch 3/4, focusing on naming the goto labels 'out' (not >> 'clean') and 'out_obj' (not 'out_end'). Additionally, the generator >> was inconsistent on whether labels had a leading space; prefer the >> emacs style of including the space, so that only function names and >> comments occur in column 1 of the generated file [HACKING gives no >> preference, and both styles occur elsewhere in qemu.git]. >=20 > Your Emacs prefers this? Mine doesn't. I'm using Dan's patch "Add .dir-locals.el file to configure emacs coding style"; which has been claimed to be on the trivial patch queue (although I haven't seen a trivial pull request since that date, nor can I find that queue pushed anywhere public): https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg04148.html >=20 > If I read CC Mode correctly, only style "gnu" does this. I use > "stroustrup" for QEMU, because it's very close. It doesn't do this. Dan's patch uses "K&R" rather than "stroustrup", although the two are similar. Digging deeper, I see that my buffer when visiting a .c in qemu sets c-label-minimum-indentation to 1, and attributes it to set-from-style; but I'm not sure why I'm getting it, as I agree with your reading of c-style-alist that c-gnu-impose-minimum (which is what typically sets c-label-minimum-indentation to 1) is only tied to "gnu" mode. So I'm lost as to why I'm seeing different behavior. >=20 > As far as I can see, the only label we generate indented before this > patch is qapi-event.py's clean. >=20 > When in doubt, avoid the churn: we rename that one anyway, so let's dro= p > the space there, and leave the others alone. Sure, I can go that way for less churn, and since I can't figure out why it's getting set for me. >=20 >> No change in semantics to the generated code. >> >> Signed-off-by: Eric Blake >> >> --- >> v6: split 9/46 into four patches, update docs where they are affected,= >> pick consistent spacing of label >> >> Signed-off-by: Eric Blake Oh weird - I didn't notice the double s-o-b, but the second one gets lost during 'git am'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --djGemSEiP23QCAiBpt2DWWhPPFE5BVBRQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWCqdAAAoJEKeha0olJ0NqdfoIAIdFcBCVU3ddDMm/2Z9JMFjR oGhyP0lmiUjrDW4vUTlE8Uaki0ZuESkAQ4RgkoGklFi1ahK6mELMNbhZDPQyXEkn yXkq4BvCxPQREOPYeWWoz2Nh1LLZtx7xMRclH/npIfw9B5kC9Trhkmr33qoRogTs vs1I0hAXoTZaThqpMBELBuIJLqqgstNMvIwcsNFIgMO7L5cl/cIiwzBUe7a4e5sP N0SnbvDw9zzeGrk0X3hFLhoeOqEVatdWCmbknVOiPkSqh7rkTGvUOY7OK3DqNpBy V0kDep1e2N0DEc+hU4JVHEYGTkP5YlAyln+C2Tyf5wRJg4AYbY6WHJDXcxCqsgI= =k8dk -----END PGP SIGNATURE----- --djGemSEiP23QCAiBpt2DWWhPPFE5BVBRQ--