Tuesday 24 February 2009

Changing the length of comments for C mode

For a long time I was irked by Emacs' habit off auto wrapping my comments especially when I was adding them to the end of lines in csharp-mode. Finally I have worked out what the problem was, after many hours of searching. As it turns out comments in c mode have been set to auto fill, and all I had to do was adjust my fill-column property to something large, (at the moment 200) and then it will only wrap the comment when the column length gets to 200. Genius. Given that I don't really use auto-fill for anything else it was a simple matter of:
  • M-x customize-variable fill-column
  • Set the value and "Save for Future Sessions"
More info at http://www.gnu.org/software/emacs/elisp/html_node/Filling.html

No comments: