Subject: 24.0.50; Unstable C-mode indentation

From: Ari Roponen <[email-masked]>
Date: Sun, 21 Mar 2010 14:48:34 +0200

Hi, the indentation of C-mode is not stable. Here is the recipe
to reproduce the problem:

1. Eval this form in "emacs -Q":

  (progn
    (switch-to-buffer "tmp.c")
    (erase-buffer)
    (c-mode)
    (insert "int fun (void)\n{\n    int a = foo ();\n}")
    (c-indent-line-or-region)
    (backward-sexp)
    (c-indent-line-or-region))

2. Now every time you press TAB-key the indentation of the
bracket alternates between two positions.

By bisecting the source (using the GIT-repo) I found that the
problem comes from:

  [email-masked]

committer: Alan Mackenzie <[email-masked]>
timestamp: Thu 2009-12-03 16:02:10 +0000
message:
  Enhance `c-parse-state' to run efficiently in "brace desserts".

After reverting that the problem goes away.

In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.19.7)
 of 2010-03-18 on arirop
Windowing system distributor `Fedora Project', version 11.0.10799901

-- 
Ari Roponen