help-gnu-emacs
[Top][All Lists]
Advanced

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

changing c-mode indentation behavior


From: Christopher Penrose
Subject: changing c-mode indentation behavior
Date: Wed, 12 Dec 2001 22:55:36 +0900

Hi Folks!

I am not an emacs expert but I have been using emacs for about 10 years. I grew quite happy with c-mode but recently (I am using 20.7.1) my variable declaration style is no longer convenient.

The problem:


c-mode used to indent variables based upon the indentation of the variable above it. For clarity I like
to indent variables in the following manner:

        int                     should,
                                be,
                                trivial,
                                to,
                                support;

In older versions of c-mode, after entering the model indentation with the variable "should" I could simply hit enter, type "be,<tab>" and the text would get indented as I intended.

Now, if I press "be,<tab>"  I get something like:

        int                     should,
          be,

Which is mildly annoying.  But it gets worse:

If I tab to the desired point under the variable "should" and then enter "be,", after striking the comma the variable is then catapulted back to the latter undesired indentation. This new "feature" of forcing your text to someone else's programming style whenever a comma or semicolon is entered is extremely frustrating. One has to enter the comma or semicolon first, and then indent the text in order to work around this unsophisticated, imposed style.

I seem to live with the other indentation idiosyncrasies of the latest c-mode developer, with the exception of the switch and case statement, but what I don't understand is why the changes were made in the first place. c-mode used to work more fluidly before.

Christopher
penrose@sfc.keio.ac.jp







reply via email to

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