GNOME Bugzilla – Bug 688275
Fixes for paranthesis indentation.
Last modified: 2012-11-15 21:08:16 UTC
The following patches fixes paranthesis indentation which was a bit broken since 166f7f2cb4eaabb4b148841881cccf2855fa081a. The last patch also adds an option whether to use only spaces for paranthesis indentation (which is the current behavior) or to use as many tabs as possible.
Created attachment 228915 [details] [review] indentation-c-style: Update preferences UI file to gtk+-3
Created attachment 228916 [details] [review] indentation-c-style: Fix modeline in plugin.c The correct modeline for using spaces is "indent-tabs-mode: nil;" and not "indent-spaces-mode: t;".
Created attachment 228917 [details] [review] indentation-c-style: Fix get_line_indentation(). get_line_indentation() was broken since 166f7f2cb4eaabb4b148841881cccf2855fa081a. Fix it by only looking for matching left brace if the current line has a right brace. Also break on the first line where the number of left braces are more than or equal to the right braces instead of just breaking on the line where the total number of left and right braces are equal.
Created attachment 228918 [details] [review] indentation-c-style: Add option whether paranthesis alignment should only use spaces. This option is by default true. If set to false we indent using as many tabs as possible.
Comment on attachment 228915 [details] [review] indentation-c-style: Update preferences UI file to gtk+-3 Thanks for you patch. I have changed the line <property name="xalign">0.5</property> to <property name="xalign">0</property> I think it's the default in glade 3, but it's wrong the default value in glade2 was 0.
Comment on attachment 228916 [details] [review] indentation-c-style: Fix modeline in plugin.c Thanks.
Comment on attachment 228918 [details] [review] indentation-c-style: Add option whether paranthesis alignment should only use spaces. Thanks for your patch.
Review of attachment 228917 [details] [review]: Thanks for your patch. I have committed it without any change.