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

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

Re: Is there a mode that helps enforce coding guidelines?


From: Kai Großjohann
Subject: Re: Is there a mode that helps enforce coding guidelines?
Date: Wed, 28 May 2003 18:43:56 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

address@hidden (Petter Wintzell) writes:

> Is there an Emacs mode that can help a programmer follow a set of
> coding guidelines and style rules? I am thinking of the simple rules
> that exist in many companies and projects regarding line length,
> comment style, indent style, hanging braces, variable names and what
> not.
>
> I would like a mode that highlighted the text when I broke a
> guideline. It would also be nice if the mode could help me correct the
> error.

For the line length, you could set the Emacs window to have the right
width.  But I've also seen mention of vvb.el which draws a vertical
bar.  Not sure if that is applicable.

Regarding indentation style, maybe C-x h C-M-\ is good enough?  You
can configure the indentation engine quite a bit in most modes.  For
C and similar, see the CC mode info file.

Alas, the Emacs indentation styles do not add or remove newlines, so
the hanging braces thing cannot be checked (if I assume correctly
what you mean).  You can configure CC mode to auto-insert newlines
when you hit `{', I think.

The GNU indent program can add or remove newlines.
-- 
This line is not blank.


reply via email to

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