GNU bug report logs - #1986
dir-locals.el take precedence over user's mode-hook changes

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 22 Jan 2009 03:05:08 UTC

Severity: wishlist

To reply to this bug, email your comments to 1986 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report stored :
bug#1986; Package emacs. (Thu, 22 Jan 2009 03:05:08 GMT) Full text and rfc822 format available.

Message #3 received at quiet <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: quiet <at> debbugs.gnu.org
Subject: dir-locals.el take precedence over user's mode-hook changes
Date: Wed, 24 Dec 2008 13:31:06 -0500
[ resent from
  http://lists.gnu.org/archive/html/emacs-devel/2008-12/msg00919.html ]

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




Severity set to `wishlist' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 24 Feb 2009 20:35:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.