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: Nix
Subject: Re: [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation
Date: Wed, 18 May 2011 21:28:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On 18 May 2011, Stefan Monnier outgrape:
> But I just want to take the opportunity to say that all this CC style
> business is much too complex for its own sake, and as a result we've
> seen and keep seeing new problems that require additional hacks on top
> of hacks to try and "fix" things.

Gods, yes. Most of this appears to be the interaction of backward-
compatibility kludge atop backward-compatibility kludge.

The indentation engine works great (the most nearly flawless I've ever
seen), and the style engine needs a certain degree of complexity --
things like inherited styles are a must, because so many styles in the
real world are almost like one of cc-mode's except for a couple of tiny
differences.

But the support for configuration through global variables *or* styles,
with styles possibly taking effect by localizing variables in one buffer
or possibly taking effect by making them local to all buffers... well,
it's just ridiculous. Rip out all that stuff and use the recommended
configuration only (style variables automatically localized to the
current buffer, direct setting of style variables always overrides the
style itself via 'set-from-style) and ditch all the rest. I'm fairly
sure that half the configurations implied by the current set of
variables are broken at any one time, because there are so many that
nobody can really test them.

(That's an alternative: a decent testing framework for this stuff, such
that we could be sure it didn't break. Then it wouldn't matter so much
how complex it got, except insofar as it bends the brains of people
trying to look at the code.)

-- 
NULL && (void)



reply via email to

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