Propcase->mode translation function doesn't probably need to be available to script writers (get_shooting_mode will just need to go through the modemap and return the CHDK mode number usable for set_shooting_mode), as long as it doesn't crash when modemap is buggy or incomplete?
No, it wouldn't crash. There are some quirks though:
For example, I noted on SD990 that:
Setting the DP button as a shortcut to movie in canon menu gives a value of (current mode)+1024 while movie is recording, unless already in movie mode
I assume other cameras with a movie button do something similar.
In sx10 and sx1 we also have
{ MODE_VIDEO_STD, 2597 }, // video standby
{ MODE_VIDEO_STD, 3622 }, // video in progress
If set_capture_mode and get_capture_mode work in CHDK values, they have to deal with these somehow. Currently mod_get will just return 0 for the mode portion if the mode isn't in the map.
Buggy modemaps don't really worry me that much, fixing those has been on the todo list for ages and this thing ought to make that finally more or less happen. Or do you think there's physical danger in switching to incorrect modes on some cameras?
Only a crash at worst, I assume. In any case, I think most are fixed now. Some of the ones I thought were broken were the old cameras (like ixus40) that actually do use 1-n as mode values.