qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <don.slutz@gmail.com>
To: "Daniel P. Berrange" <berrange@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] Add .dir-locals.el file to configure emacs coding style
Date: Thu, 04 Jun 2015 13:46:16 -0400	[thread overview]
Message-ID: <55708EE8.3000603@Gmail.com> (raw)
In-Reply-To: <20150604133034.GB27201@redhat.com>

On 06/04/15 09:30, Daniel P. Berrange wrote:
> On Wed, Jun 03, 2015 at 09:47:24AM +0200, Markus Armbruster wrote:
>> "Daniel P. Berrange" <berrange@redhat.com> writes:
>>
>>> The default emacs setup indents by 2 spaces and uses tabs
>>> which is counter to the QEMU coding style rules. Adding a
>>> .dir-locals.el file in the top level of the GIT repo will
>>> inform emacs about the QEMU coding style, and so assist
>>> contributors in avoiding common style mistakes before
>>> they submit patches.
>>
>> Yes, please!
>>
>>> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>>> ---
>>>  .dir-locals.el | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>  create mode 100644 .dir-locals.el
>>>
>>> diff --git a/.dir-locals.el b/.dir-locals.el
>>> new file mode 100644
>>> index 0000000..ddb2fae
>>> --- /dev/null
>>> +++ b/.dir-locals.el
>>> @@ -0,0 +1,8 @@
>>> +(
>>> + (c-mode . (
>>> +            (c-file-style . "K&R")
>>> +            (indent-tabs-mode . nil)
>>> +            (c-indent-level . 4)
>>> +            (c-basic-offset . 4)
>>> +            ))
>>> +)
> 
> [snip]
> 
>> Does the following .dir-locals.el work for you equally well?
>>
>> ((c-mode . ((c-file-style . "stroustrup")
>>             (indent-tabs-mode . nil))))
> 
> Yes, that is fine too.
> 

I got this from someone on the list, see

https://wiki.linaro.org/PeterMaydell/QemuEmacsStyle

Which then allows me to do:

((c-mode . ((c-file-style . "qemu"))))

in .dir-locals.el

But this is not a good general change :(

But I would like at least the the stroustrup version.

   -Don Slutz

> Regards,
> Daniel
> 

  parent reply	other threads:[~2015-06-04 17:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 15:26 [Qemu-devel] [PATCH] Add .dir-locals.el file to configure emacs coding style Daniel P. Berrange
2015-06-02 16:02 ` Eric Blake
2015-06-02 19:08   ` John Snow
2015-06-03  7:47 ` Markus Armbruster
2015-06-04 13:30   ` Daniel P. Berrange
2015-06-04 17:45     ` [Qemu-devel] [Qemu-trivial] " Don Slutz
2015-06-04 17:46     ` Don Slutz [this message]
2015-06-17 19:42 ` [Qemu-devel] " Michael Tokarev
2015-06-18  8:36   ` Markus Armbruster
2015-06-18  9:05     ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55708EE8.3000603@Gmail.com \
    --to=don.slutz@gmail.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).