emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH] setting indentation styles via `c-file-style' fails to a


From: Alan Mackenzie
Subject: Re: [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation
Date: Thu, 2 Jun 2011 12:24:12 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Nix.

On Wed, Jun 01, 2011 at 03:31:16PM +0100, Nix wrote:
> On 18 May 2011, Stefan Monnier said:

> >> Certainly the state of play before this change works worse, but that's
> >> about as confident as I'm willing to be.

> > Thanks for taking the trouble to track down your problem and provide
> > a fix.  I'll let Alan check the actual change and decide if it's
> > safe enough.

> Ping?

Sorry, I wasn't aware of this bug.  Thanks for the ping.  I'm not
subscribed to emacs-devel at the moment, but I'm still attending to
address@hidden

I'm now looking at the bug.  You didn't say what version of Emacs you
found it in, but I can say that this bug isn't in 23.3 or the standalone
CC Mode - at least not with `c-file-style' being used, in accordance with
its documentation, as a file local variable.

I agree with Stefan, the whole business of initialising style variables
has passed the level of complexity at which humans can handle it.  IMAO,
the straw that broke the camel's back was the misuse of `c-file-style' in
.dir-locals (for which I accept I'm mostly to blame).  Before any other
ways of simplification are explored, this use of `c-file-style' needs to
be separated from the normal use, possibly by something like this in the
Emacs core:

    (if (and (boundp 'c-file-style)
             c-file-style)
        (setq c-dir-style c-file-style
              c-file-style nil))

.  Then CC Mode could get rid of all the attempted hacks for handling the
hybrid `c-file-style'.

At a guess, the bug is caused by calling c-file-style with a setting of
`dont-override' which causes it to choke on the above hacks.

Thanks for taking so much trouble to track this bug down.

> -- 
> NULL && (void)

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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