[Top][All Lists]

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

Re: Blunderbuss ".dir-locals.el" raises everything in its path!!

From: Dan Nicolaescu
Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!!
Date: Sun, 12 Jul 2009 19:08:20 -0700 (PDT)

Chong Yidong <address@hidden> writes:

  > Alan Mackenzie <address@hidden> writes:
  > >> I'm not sure I understand.  Directory-local variables are processed
  > >> right before file-local variables, and can be overridden by them.
  > >
  > > Sorry, yes.  But that's the only thing they can be overridden by.  That
  > > is surely not the right thing.
  > >
  > > Why on earth does .dir-locals.el take precedence over values set in a
  > > top-level `setq' or `c-mode-hook'?  This is surely the Wrong Thing to
  > > do.
  > Because setting a directory-local variable is supposed to have the same
  > effect as setting a file-local variable inside every file in that
  > directory.  Thus, instead of putting c-fill-style inside every .c file
  > in the Emacs source tree, you can simply write a .dir-locals.el file.
  > > In particular, the File Style and local variables settings are rarely
  > > used precision instruments, for configuring unusual files unusually.
  > This indicates that we should not set c-file-style in the .dir-locals.el
  > file of the Emacs source tree.

The problem that c-file-style in .dir-locals.el tries to solve is to
make sure that anyone that edits files in emacs will use the GNU style
regardless of what the user sets in his .emacs.

Say one works on projects that have very strong code style requirements,
and the styles are different for different projects, say for example the
GNU toolchain and Linux.   

If all these projects set the correct style in their .dir-locals.el file
then the user does not have to do anything in order to always use the
correct style.

The above is an example of a concrete problem solved by .dir-locals.el. 
What is the problem in bug#3808 ?  Is it a real problem, or it's just
.dir-locals.el working exactly as expected.

reply via email to

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