[Geany-devel] Patch adding auto-close brackets, braces and string r1

Enrico Tröger enrico.troeger at xxxxx
Mon Dec 15 20:19:33 UTC 2008


On Mon, 15 Dec 2008 13:12:54 +0000, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:

>On Tue, 9 Dec 2008 05:14:08 +0100 (CET)
>ioguix at free.fr wrote:
>
>> In a first step, when opening a brace (ie. ( { [ ), we could check if
>> no closing brace already match it before auto-closing it. That what I
>> tried to do in the attached patch.

I actually worked on the patch yesterday but had some weird
connectivity issues (some sites weren't reachable including
sourceforge.net, so no commits).

@ioguix:
The second of your patch was about to change handling of
GEANY_AC_SQUOTE with end_pos which was IMO a typo and should have been
in the GEANY_AC_SBRACKET, so I moved it there. Correct me if I'm wrong.


>> - can we really test if we are actually in a in string whatever the 
>> current language style ?
>
>Yes, but maybe not all filetypes are completely supported. See
>is_string_style() in editor.c.

Though this function treats all kinds of strings equally, that is for
languages like C or Python where you have different kind of strings
('blah', "blah", ''' blag ''', ...) this function returns TRUE for all
kinds. But you probably want something more fine-grained to
differentiate between 'blah' and "blah".


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20081215/5e766dbf/attachment.pgp>


More information about the Devel mailing list