emacs-devel
[Top][All Lists]
Advanced

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

dir-locals.el take precedence over user's mode-hook changes


From: Stefan Monnier
Subject: dir-locals.el take precedence over user's mode-hook changes
Date: Wed, 24 Dec 2008 13:31:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

It seems that the dir-local.el settings are applied after the major mode
hook has been run.
That makes it pretty impossible for the user to override them, which is
problematic (I noticed it because I use a tab-width of 4 in my (Emacs)
ChangeLog files and now tab-width is back to 8).

I guess it's the same problem as the one of setting file-local
variables, but for directories it's even worse.  We should provide some
way to override those settings.

Currently, I add a hook to hack-local-variables-hook from within my
mode-hook, which works but isn't the most obvious.  So we should at
least document this workaround.  Maybe we should also provide
an option inhibit-file-local-variables which contains a list of
variables that hack-local-variables would have to ignore.


        Stefan





reply via email to

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