First let me say that this is a great idea. I set up the SX260 while watching the meteor shower, and the backlight flashing was unacceptable. Leaving the backlight on was also too bright, so I ended up setting the camera pointing straight up so I wouldn't see all the light. Anyway, here's my two cents:
1. I don't see any need for a new Lua function. Just modify set_backight in C so it tries to use call_event_proc first, and if that fails, it uses the current function (with backlight fix).
2. You should turn the backlight on when the script terminates, or when the script encounters an error. I already have this in my backlight fix. If there's a timing problem, just save the tick_count when you turn the backlight off, and make sure a minimum time has passed before turning it back on.
3. The changes should be done in the C code, and not require script changes. It will simply make set_backlight(0) work correctly now. It's probably best to do it for Lua and then repeat the code in uBasic since they're modules that don't run at the same time.
I should have some time to try it out by this weekend. I'm still processing all the meteor shower pictures I got on Tuesday night. I can probably write the luascript.c code changes if no one else gets to it in the next few days. Can someone show me how to do the call_event_proc code in C?
Thanks again reyalp (and others) for figuring this out.