emacs-devel
[Top][All Lists]
Advanced

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

Re: dir-local vs major-mode setting


From: Stefan Monnier
Subject: Re: dir-local vs major-mode setting
Date: Wed, 14 Nov 2018 22:00:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> If the project is expected to contain .tex files then the above would
> constitute a bug in the .dir-locals.el file (which should contain mode-
> specific entries for exceptions to the global settings).

The whole point of `nil` is that it's not mode-specific.

>> I guess sometimes you want one and sometimes you want the other.
>> So maybe to handle that case we'd want to introduce another wildcard
>> that works like the `nil` above but implies it's applied before running
>> the major mode's setup function.
> If a "hack certain local vars before running hooks" facility was added,
> I wouldn't think it should be constrained to the nil case?

For the non-nil case, the need is much less severe: for any given major
mode, in 99% of the cases, an early setting will either have no effect
or have the same effect as a late setting.

This said, for parent major modes (e.g. prog-mode, text-mode), it can
still be useful in more than 1% of the cases, indeed.


        Stefan



reply via email to

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