qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] .dir-locals.el: add json schema to auto-mod


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] .dir-locals.el: add json schema to auto-mode
Date: Thu, 31 Aug 2017 11:19:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 08/31/2017 08:14 AM, Marc-André Lureau wrote:
> The json schema is more friendly to python-mode since it doesn't
> follow strictly json (comments to start with).

I found that hard to read, and missing a key word of 'emacs'.  Maybe
reword it as:

Under emacs, our QAPI files (.json suffix) are more friendly to edit
under python-mode than the per-suffix default of json-mode (in part
because of our use of comments).

> 
> All schema files add file variables to set the python mode, but most
> tests didn't. This will cover all json files now.
> 
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---

> +++ b/.dir-locals.el
> @@ -2,6 +2,8 @@
>              (indent-tabs-mode . nil)))
>   (nil . ((eval . (setq auto-mode-alist (append
>                                          '(("Makefile.*" . 
> makefile-gmake-mode)
> -                                          ("\\.mak\\'" . 
> makefile-gmake-mode))
> +                                          ("\\.mak\\'" . makefile-gmake-mode)
> +                                          ;; json schema is not pure json
> +                                          ("\\.json\\'" . python-mode))
>                                          auto-mode-alist))))
>        ))

Not sure if the comment could be worded better, maybe:

;; Our .json files are QAPI, and allow more than pure json

Again, the idea makes sense to me, but you may want to get feedback from
other power emacs users.

[Also, don't forget the 0/2 cover letter if you send v2]

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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