[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: João Távora
Subject: Re: Add a separate mode for .dir-locals.el
Date: Sat, 19 Oct 2019 17:13:54 +0100

On Sat, Oct 19, 2019 at 3:03 PM Eli Zaretskii <address@hidden> wrote:
> No, I wouldn't call it "extension", either.  I meant to teach
> elisp-mode to recognize files that have only ELisp data structures in
> them, and adapting itself to such files.

The "recognizing" part of that is close to impossible, in the general case.
The file can be ill-formed, for example.  And think of the false
positives.  Most of this mail is valid elisp syntax, for example (though
obviously not a elisp program).

> The latter [the major mode] would be in-line with our other major
> modes, which in most cases turn themselves on automatically, given
> some tell-tale indications in the file's contents or its name.

But we always do it on a "best-effort" basis.  Users, organization etc,
then use auto-mode-list, mode cokkies, dir-locals or even
magic-mode-alist to plug those holes.

Just because we introduce a major mode, we're not obliged to be
super-smart and turn in on whenever possible.

Of course we can study your super-recognizer-heuristic later on, but
that's a completely orthogonal problem: to follow your
bellic-ornithological metaphor, it's akin to unleashing full-scale war
on those poor sparrows.  Even if you decimate them, some will survive,
and you'll have killed many other birds in the process.  For now, just
give everyone a slingshot and be done with it.


reply via email to

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