ok, I have a patch ready that does two things:
1. comment/uncomment for every language that supports single line comments. presently, I have done this by hard coding the comment tokens for each language. In a subsequent patch I will change this by adding the comment token to the lexer property xml files. I could also write a more general comment/uncomment to handle languages that only support comment token pairs (e.g. html uses <!-- and -->) by placing the each line within a pair (or placing the whole block in a pair)
2. smart indent for python code (any line whose last non-white space char is a colon will indent one level deeper). this also mean smart indent now only operates on files whose lexer is either cpp or python. I don't use other languages often enough to want to think about an appropriate smart indent for them, but I'll take requests. maybe there is a case designing a more flexible smart indent whose properties could be specified in the lexer property xml files? for example, the ideal smart indent in c++ would be to indent the next line following any flow control statement, but then dedent if the user presses { (and indent the next line, instead) although this might be impossibly messy to specify in xml...
as arbiter of cb taste, mandrav, what are your thoughts on:
a) if i submit the patch in its present form does it have any chance of acceptance? I imagine hard coding the comment tokens might be an issue, but i can always repatch later...
b) should i be using styledtextctrl::getlexer or cbeditor::getlanguage to determine the active language? I'm using the former because the language codes are clear cut in scintilla, whereas i couldn't find a well-defined list of strings describing each language for the latter (not that i spent a long time looking)