unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Nix <nix@esperi.org.uk>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
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	[thread overview]
Message-ID: <20110602122412.GA2448@acm.acm> (raw)
In-Reply-To: <87wrh5tyh7.fsf@spindle.srvr.nix>

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
bug-cc-mode@gnu.org.

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	other threads:[~2011-06-02 12:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 23:21 [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation Nix
2011-05-18  0:17 ` Stefan Monnier
2011-05-18 20:28   ` Nix
2011-05-18 21:08     ` ERT indentation testing (was: [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation) Ted Zlatanov
2011-05-18 22:19       ` ERT indentation testing Stefan Monnier
2011-05-19 10:33         ` Ted Zlatanov
2011-05-19 11:56           ` Stefan Monnier
2011-06-01 21:30             ` Ted Zlatanov
2011-06-02 18:43               ` Ted Zlatanov
2011-06-03  0:04                 ` Stefan Monnier
2011-06-03 11:33                   ` Ted Zlatanov
2011-06-03 12:12                     ` martin rudalics
2011-06-03 15:06                       ` extra-interactive functions (was: ERT indentation testing) Ted Zlatanov
2011-06-03 15:27                         ` extra-interactive functions martin rudalics
2011-06-03 16:11                           ` Ted Zlatanov
2011-06-03 18:59                             ` martin rudalics
2011-06-03 19:10                               ` Ted Zlatanov
2011-06-03 20:54                                 ` martin rudalics
2011-06-08 10:44                 ` ERT indentation testing Ted Zlatanov
2011-06-08 15:24                   ` Stefan Monnier
2011-06-09 16:05                     ` Ted Zlatanov
2011-06-10 20:41                       ` Stefan Monnier
2011-06-01 14:31   ` [RFC PATCH] setting indentation styles via `c-file-style' fails to actually change indentation Nix
2011-06-02 12:24     ` Alan Mackenzie [this message]
2011-06-02 13:35       ` Stefan Monnier
2011-06-02 16:47       ` Nix
2011-06-02 21:15         ` Alan Mackenzie
2011-06-02 21:43           ` Nix
2011-06-05 15:06             ` Alan Mackenzie
2011-07-24 10:07               ` Kan-Ru Chen
2011-08-05 14:14               ` Nix
2011-05-18  3:27 ` Glenn Morris
2011-05-18 11:02   ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110602122412.GA2448@acm.acm \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=nix@esperi.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).