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

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

RE: comments in cc mode


From: Massmann, M. (Michael)
Subject: RE: comments in cc mode
Date: Thu, 20 May 2010 11:33:28 +0200

Dear Andreas,

Many thanks for this. Could you point me to the documentation for the options 
available for comment-style? After playing around with some of them I did not 
get the desired effect.

I also had a look at cc-mode's `c-indent-comment-alist' and set every single 
entry to `column' and `nil', so as to have the default column (ie 100) apply, 
no matter what the surrounding syntax is. The variable 
`c-indent-comments-syntactically-p' I set to nil so that it does not override 
the previous settings.

This seems to have the desired effect that when I press M-; to insert a *new* 
comment on a line, empty or not, the comment indeed starts in column 100.

Yet when I press M-; to re-align an *existing* comment, the entire comment is 
moved to a column other than 100 in 9 out of 10 cases.

Any advice on how to rectify this problem would be appreciated. Thanks!

Regards,
Michael




> -----Original Message-----
> From: Andreas Röhler [mailto:andreas.roehler@easy-emacs.de]
> Sent: donderdag 8 oktober 2009 11:07
> To: Massmann, M. (Michael)
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: comments in cc mode
> 
> Michael wrote:
> > Dear all,
> >
> > I was wondering whether there is a simple way of changing the various
> > ways comments are placed in cc mode to one single default: always
> > place a double forward slash in column, say, 100 and then the comment
> > thereafter? I have experimented with the menu options yet so far to
> no
> > avail.
> >
> > Any suggestion is appreciated. Thanks.
> >
> > Greetings,
> > Michael
> >
> 
> M-x set-comment-column
> M-x customize-variable RET comment-style
> 
> mode has it's own list BTW
> 
> cc-mode-help@lists.sourceforge.net
> 
> HTH



reply via email to

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