emacs-devel
[Top][All Lists]
Advanced

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

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


From: João Távora
Subject: Re: Add a separate mode for .dir-locals.el
Date: Sun, 20 Oct 2019 09:17:37 +0100

On Sun, Oct 20, 2019 at 6:45 AM Eli Zaretskii <address@hidden> wrote:
> > > will have to devise some way of turning on that new mode automatically
> > I don't think that should be a prerequisite.
> Why not?  It would be very unusual and inconvenient for a major mode
> to require that it be manually turned on to be useful. Do we have any
> other major mode that needs that?

Of course we do, and that's why we provide so many flexible ways to let
users fix it.  I don't control the file names and extensions of most of
the files I work with, but I do control my Emacs's variables.

> If we can automatically generate the mode cookie, we can automatically
> generate any other file-local variable we might need, like
> 'no-byte-compile: t' or the setting for an Xref backend.

Then you'd have a proliferation of identical buffer-local variable
blocks.  And I know a good way to refactor that ;-)

But cookie generation would only be for very tight cases, I think, if
any at all.  Because for files whole filenames and/or standard locations
we know, such as dir-locals.el, bookmarks, ido-last, recentf,
tramp-something, etc. we can just leverage the existing auto-mode-alist
and magic-mode-alist.

_And_ we can do always it incrementally, we _dont_ have to hurry or rush
to decisions for this change to start being useful.

João

reply via email to

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