Hi, I've thought of some more plugin API changes to improve consistency and/or organisation:
1. Make header names consistent - I've used ui_utils.h, plugin-symbols.c - probably they should just be uiutils.h, pluginsymbols.c.
2. Make editor functions take a GeanyEditor struct pointer. The editor fields of GeanyDocument could be moved into a separate struct, as the document struct is quite big, making it harder to locate fields. This is also good for an object-based design.
3. The document functions could take/return a GeanyDocument pointer instead of a document index, which would avoid the use of: documents[idx]-> being repeated all over the code base when doc-> is much neater. We would also need to update functions like msgwin_msg_add which take a idx parameter (this seems to be the only one at first glance).
This could be quite a big change, so it could be brought in gradually by having an additional p_documents field in GeanyFunctions, using a documents_ prefix for the new functions instead of document_. Once the changes are complete we could deprecate the old ones.
What do you think?
Regards, Nick