@reyalp: I saw the changes you made to the patch. While implementing, at first I also thought of using a bitfield. But the reason I didn't do that, and why I think it is not a good option right now, is that in my oppinion it complicates code for no foreseeable benefit. I understand that this theoretically makes adding new scripting languages possible, but as I have seen (I think it was this thread earlier) there is really no interest in adding UBasic support to PTP. And I also see no realistic chance of adding a third scripting language later on.
The reason it complicates code so much is that because you start supporting "scripting interfaces", as noted in the code comments. So to truely stay correct and open to future additions in the future, for every script-related PTP command you would need to supply a "target interface" as an argument (=an argument to state which scripting interface you are communicating to). This adds a lot of related problems, like what if there are multiple interface targets specified, how do you handle returning different errors in these cases and so on. And as stated, I cannot foresee supporting a scripting language in PTP other than LUA at the moment. So is this all worth it?
A relatively unrelated note: Maybe it would be better, instead of a ScriptSupport command, to have a general FeatureQuery command, that could return supported features of the current CHDK & camera in a bitfield. Not only for scripting, but games/zoom/native_calls/and other features.