[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-indent] New Options and Bug Fixes
From: |
Daniel P. Valentine |
Subject: |
[Bug-indent] New Options and Bug Fixes |
Date: |
Sun, 18 Apr 2004 06:25:02 -0400 |
Hi,
Attached is a patch that contains the 4 things I had to do to make
indent work for me.
The new option -icb leaves the closing brace of a block indented the
same amount as the text, so that the first thing at the same level as
the opening of the block is the next thing outside the block. The
result looks like
if (x < 1) {
x++;
}
printf ("%d\n", x);
The second new option -bbbo extends the good start of -bbo to prefer
breaking before rather than after any binary operator. Since this
seems to be in the spirit of the GNU coding standards, I have included
it in the -gnu option as well.
Both options are documented in the texinfo file (also in the patch),
and the both have a negated version.
The two changes that I would call bug fixes were a fix to the paren
indent stack so that the indent level is correctly reflected (changed a
> to a >=), and a change to the handling of search-braces so that the
--ignore-newline option stops it from working with the flushed_nl.
Previously, newlines encountered in the search_brace function were not
properly ignored.
indent-patch2.txt
Description: Text document
indent-patch2.txt.asc
Description: Text document
I hope they are helpful.
Dan Valentine
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-indent] New Options and Bug Fixes,
Daniel P. Valentine <=