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

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

Re: Comments always aligned at column 67 despite comment-column set othe


From: Jeff Clough
Subject: Re: Comments always aligned at column 67 despite comment-column set otherwise
Date: Tue, 23 Mar 2010 17:31:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

eric_powell <epowell1@med.miami.edu> writes:

> All I would like to be able to do is set the comment column and then when I
> press M-;, for a comment to appear at that column.  I am trying to do this
> by setting the variable set-comment-column.  Seems simple enough, but no
> matter where I set this value, the comment always appears at column 67. 

The variable is actually named "comment-column".  You can test and/or
play around with it by doing a M-: and typing

(setq comment-column n)

Where n is the column number.  It should make M-; work as expected.
Once you find a number that works for you, you'll probably need to use
customize in order to make it permanent (it's buffer local).  You can
most easily do that by doing describe-variable on comment-column with
C-h v, then clicking the "customize" link near the bottom of the help.

> Furthermore, the M-; command is supposed to also realign existing comments,
> but in that case, it moves the comments to a completely different column
> (neither 67 nor what I set it to).

This also works with comment-column set as I noted above.

> This problem is absolutely driving me crazy.  Please someone help.
>
> I am mostly using emacs for c++ code, which I think is using cc-mode with
> the gnu style, but it would be nice if I could configure this behavior also
> for perl and bash code.  

It should.

Jeff




reply via email to

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