[Libosinfo] [PATCH libosinfo 2/2] Remove emacs 'Local variables' annotations
Daniel P. Berrangé
berrange at redhat.com
Thu Mar 7 09:46:27 UTC 2019
On Wed, Mar 06, 2019 at 03:30:41PM -0500, Cole Robinson wrote:
> On 3/4/19 5:08 AM, Daniel P. Berrangé wrote:
> > On Sat, Mar 02, 2019 at 06:35:18PM -0500, Cole Robinson wrote:
> >> No other virt projects have annotations like this, plus IMO
> >> .editorconfig handles this in a much nicer way and more flexible
> >> way. Ditch them
> >
> > .editorconfig requires users to install extra packages to work.
> >
> > If we want to remove emacs annotations, then we need to have
> > a .dir-locals.el file defined, so that correct indentation is
> > used out of the box with emacs.
> >
> >
> > Regards,
> > Daniel
> >
>
> Does the attached patch work for you? I've never used emacs so I don't
> trust my testing
It matches the current per-file rules so that's good enough. Libvirt
also sets K&R style in its .dir-locals.el, but the the only really
key thing is the tab-killing part from my POV.
> From 1a716cbbe5a32f829cf90ead6dfdceefd8d620f3 Mon Sep 17 00:00:00 2001
> Message-Id: <1a716cbbe5a32f829cf90ead6dfdceefd8d620f3.1551904198.git.crobinso at redhat.com>
> From: Cole Robinson <crobinso at redhat.com>
> Date: Wed, 6 Mar 2019 15:27:42 -0500
> Subject: [PATCH libosinfo] Add toplevel .dir-locals.el
>
> This centralizes emacs config in a top level file, matching the
> bits sprinkled around in 'Local variable' comments
>
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
> .dir-locals.el | 7 +++++++
> 1 file changed, 7 insertions(+)
> create mode 100644 .dir-locals.el
>
> diff --git a/.dir-locals.el b/.dir-locals.el
> new file mode 100644
> index 0000000..85795b3
> --- /dev/null
> +++ b/.dir-locals.el
> @@ -0,0 +1,7 @@
> +(
> + (c-mode . (
> + (indent-tabs-mode . nil)
> + (c-indent-level . 4)
> + (c-basic-offset . 4)
> + ))
> + )
> --
> 2.20.1
>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the Libosinfo
mailing list