[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: |
Alan Mackenzie |
Subject: |
Re: Blunderbuss ".dir-locals.el" raises everything in its path!! |
Date: |
Tue, 14 Jul 2009 16:22:06 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Jason, Jan, Stefan!
On Mon, Jul 13, 2009 at 01:09:24PM +0800, Jason Rumney wrote:
> Chong Yidong wrote:
> >This indicates that we should not set c-file-style in the .dir-locals.el
> >file of the Emacs source tree.
> I think it points to a bug in the handling of c-file-style. The
> documentation of c-cleanup-list (which is the variable that Jan was
> surprised about) says that it should only be affected by the style when
> it is set to set-from-style.
I think you're right here, and that the bug is that the function handling
c-file-style forgets to check that its value is 'set-from-style. The
complexity of all the interacting features is far too high IMAO, and my
brain is right at the limits of what it can grasp; even though I'm
currently the custodian for a great deal of this complexity.
I've thought a lot about this, and think I now understand the problem.
The CC Mode manual (on page "Config Basics") lists the various ways of
setting a style variable in order of precedence, like this:
If you make conflicting settings in several of these ways, the way
that takes precedence is the one that appears latest in this list:
Style
Top-level command or "customization interface"
Hook
File Style
I confused myself by pompous language. If instead of "If you make
conflicting settings ..." I had written "If you set a style variable in
several of these ways ...", I don't think I would have got this feature
wrong.
However, this fails to mention directly setting a style variable in the
Local Variables section, or to distinguish that from a File Style. The
list, perhaps, should look like this, with the code being change
accordingly:
Style
File Style <-------------
Top-level command or "customization interface"
Hook
File local variable setting <-------------
As I say, I'm not totally unconfused about all this at the moment, but
I'm confident that you (Jason) have identified the problem.
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, (continued)
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Stefan Monnier, 2009/07/16
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Juri Linkov, 2009/07/16
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Lennart Borgman, 2009/07/16
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Stefan Monnier, 2009/07/16
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Juri Linkov, 2009/07/17
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Juri Linkov, 2009/07/18
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Ken Raeburn, 2009/07/13
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Dan Nicolaescu, 2009/07/12
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Jason Rumney, 2009/07/13
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/13
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!,
Alan Mackenzie <=
- Re: Blunderbuss ".dir-locals.el" raises everything in its path!!, Stefan Monnier, 2009/07/14
- Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/14
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Jan Djärv, 2009/07/15
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/15
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Stefan Monnier, 2009/07/15
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Chong Yidong, 2009/07/15
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/18
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Jan Djärv, 2009/07/20
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/20
- Re: Patch: Blunderbuss ".dir-locals.el" raises everything in its path!!, Jan Djärv, 2009/07/20