[Top][All Lists]

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

Re: Add a separate mode for .dir-locals.el

From: Clément Pit-Claudel
Subject: Re: Add a separate mode for .dir-locals.el
Date: Thu, 17 Oct 2019 09:51:45 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 2019-10-17 09:16, Eli Zaretskii wrote:
>> From: João Távora <address@hidden>
>> Date: Thu, 17 Oct 2019 13:21:37 +0100
>> Cc: address@hidden
>> I don't know who proposed it, or what it meant exactly, but solving this
>> in Flymake directly sounds like hack.
> Why is that a hack?

Flymake in ELisp mode is configured from emacs-lisp-mode, by adding two 
checkers to flymake-diagnostic-functions.  We could change that code to only 
add the hooks if the file name is not .dir-locals.el, but that seems less clean 
than creating a separate mode for .dir-locals.el files, since they aren't 
proper Emacs Lisp files.

> Shouldn't Flymake "understand" the file it is
> working on, including its syntax etc.?

In general, at least in Flycheck, we try to restrict that understanding to 
looking at which major-mode we are currently in (there are a few exceptions, 
like in sh-mode, where we look at the dialect using sh-shell, for example).

reply via email to

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