emacs-devel
[Top][All Lists]
Advanced

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

Why we SHOULDN'T add a separate mode for .dir-locals.el


From: Alan Mackenzie
Subject: Why we SHOULDN'T add a separate mode for .dir-locals.el
Date: Sat, 19 Oct 2019 12:28:23 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Stefan.

On Thu, Oct 17, 2019 at 09:40:32 -0400, Stefan Monnier wrote:
> >> .dir-locals.el files are currently opened in emacs-lisp-mode, but they are
> >> not proper Emacs Lisp files;
> > In which way are they not proper?

> They use the Sexp syntax of Elisp, but other than that, they're not
> Elisp in the sense that they don't contain Elisp expressions.

So what?  There's nothing against one major mode being appropriate for
several "types" of file, for whatever meaning of type.

> I think it makes a lot of sense to make them use a different major-mode.

I disagree entirely.  The talk has been about cutting things out of
Emacs Lisp Mode to make a new mode.  So, the question arises, what
should be cut out?

Answer; NOTHING!  I want all the facilities of Emacs Lisp Mode whilst
editing a .dir-locals.el, not to have some overlord determine for me
what I don't really want.

> Not just for flymake.  They could also use different font-lock rules,
> they could benefit fromad-hoc key-bindings to add/remove settings, ...

I think you're just making hypothetical arguments for a new mode, here.
What specifically is wrong with Emacs Lisp Mode's font locking for
.dir-locals.el?

As for the add-hoc key bindings, the normal way to do that is with a
minor mode, surely?  What particular settings were you thinking about,
anyway?

#########################################################################

So, the situation we find ourselves in is that we want all of Emacs Lisp
Mode to be operational whilst editing .dir-locals.el.  We don't really
want anything extra (or if we do, a minor mode is the way to do it).

This is the prime criterion for having a single major mode for
.dir-locals.el and foo.el.

#########################################################################

It seems there's some sort of a problem (which I don't fully understand)
in the relationship between Emacs Lisp Mode, dir-locals.el and
flymake.el.  Since a separate major mode for dir-locals.el isn't
sensible, some other appropriate way of solving that problem.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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