[Geany-devel] Parentheses auto-indentation

Colomban Wendling lists.ban at xxxxx
Mon Jun 7 17:02:10 UTC 2010


Le 07/06/2010 16:43, Colomban Wendling a écrit :
>
>    1. How to know if a character is or not part of a comment, string
>       or so? (e.g. should be interpreted as a syntactic element by
>       itself) I need this to find the parenthesis -- and no, I can't
>       do the same than brace_match() since I don't know the position
>       of any of the parentheses.
>    2. Why brace_match() uses the character at (pos - 1) but the style
>       at (pos)? This seems to be needed for brackets but breaks with
>       parentheses (see comments in the WIP patch).
>
Again... a little update of the current state that fixes some errors of
the previous one (which broke some existing indentation). Notably, my
original problem 2) is gone by using sci_find_matching_brace(). Last
known problem is 1) -- which is not a problem most of the time, but still.

Regards,
Colomban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100607/365ef54d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indent-matching-parentheses-draft-2.patch
Type: text/x-patch
Size: 3113 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100607/365ef54d/attachment.bin>


More information about the Devel mailing list