On Mon, Feb 12, 2018 at 10:52 AM, Daniel P. Berrangé
> On Sat, Feb 10, 2018 at 06:40:13PM -0600, Eric Blake wrote:
>> Our QAPI input files aren't quite true JSON (comments being the obvious
>> difference); naming things .json doesn't make that obvious. Use a new
>> suffix .qapi that makes it easy to identify our files.
>> This change is mostly mechanical, but it is not just a global
>> search-and-replace as some instances of '.json' really do refer
>> to JSON files, or to a URL that can't change, and so on.
>> Signed-off-by: Eric Blake <ebl...@redhat.com>
>> I'd also like help figuring out how to make .dir-locals.el give
>> an automatic sane mode to all .qapi files
> Stuff I'm reading the suggests the only way to achieve that is to
> use 'eval' which is considered unsafe for .dir-locals.el. As a
> result the user will get prompted to allow the "eval" to run
> when emacs starts which is unpleasant :-(
I suggested such patch some time ago:
"[PATCH 2/2] .dir-locals.el: add json schema to auto-mode"
I still consider that a one time prompt for this is fairly unintrusive
(after all you, run so much code you trust blindly by doing make check
from qemu :)
> Alternatively though, just add "-*- json -*-" in a comment in
> the first line of the file
In each file, that's intrusive. Especially because there are no
comments in json in theory :)