Hi all, .dir-locals.el files are currently opened in emacs-lisp-mode, but they are not proper Emacs Lisp files; as a result, Flymake generates incorrect diagnostics, and I don't know of an easy way to customize Emacs specifically for these files (there's is no hook that runs every time a dir-locals file is opened). We've had a similar problem for a while in Flycheck. The attached patch creates a trivial dir-locals-mode, derived from emacs-lisp-mode, and removes Flymake backends in that mode. Thoughts? Clément.