qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add .dir-locals.el file to configure emacs codi


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH] Add .dir-locals.el file to configure emacs coding style
Date: Wed, 17 Jun 2015 22:42:43 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

So, what is the consensus here?

Everyone who talked wants the emacs mode, but everyone
offers their own mode.

I'd pick the stroustrup variant suggested by Marcus
since it is shortest, but while being shortest, it
is looks a bit "magical".  On the other hand, variant
from Peter Maydell (https://wiki.linaro.org/PeterMaydell/QemuEmacsStyle)
explicitly defines everything.

Thanks,

/mjt

02.06.2015 18:26, Daniel P. Berrange wrote:
> 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.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  .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)
> +            ))
> +)
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]