GNU bug report logs - #5747
24.0.50; Unstable C-mode indentation

Previous Next

Package: emacs;

Reported by: Ari Roponen <ari.roponen <at> gmail.com>

Date: Sun, 21 Mar 2010 13:31:02 UTC

Severity: normal

Merged with 5741

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ari Roponen <ari.roponen <at> gmail.com>
To: 5747 <at> debbugs.gnu.org
Subject: bug#5747: 24.0.50; Unstable C-mode indentation
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:

  acm <at> muc.de-20091203160210-5u4g9gppsv3zts3e

committer: Alan Mackenzie <acm <at> muc.de>
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





This bug report was last modified 15 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.