lapser, did your revised code ever get merged back in to the development branch?
No, lapsers code was never merged into the trunk.
There is certainly some good ideas there that would be nice to have. I'm not averse to having it in CHDK in principle, though it would probably be for 1.3 as 1.2 getting very close to release.
A bit of explanation of why I haven't made effort to get this into the trunk:
The last versions that I saw, the code had a lot of different, not very closely related changes. Some of them were related to working around the lua bug, which has since been fixed. I am much more likely to accept patches that are in clearly defined, digestible chunks. Code dumps of "here's a bunch of cool stuff I did" are not something I want to spend my limited CHDK development time on. I also greatly prefer clear interfaces, even if it doesn't give you the absolute maximum performance or efficiency, and prefer to provide building blocks for scripts rather than have entire features hard coded in the core. In the past I've have accepted things I felt were too ugly but didn't have the time to sort out, and I have almost always come to regret it later. If someone wants to take the features lapser developed and work them into patches with the characteristics outlined above, I'd definitely be happy to consider including them.
Isn't this what the development branch is for, can't we just put in whatever is useful no matter how much of a mess it is? In a word: No. It is acceptable to have a mess in the trunk, but only if there is a clear path to making it something that is eventually acceptable for release and someone committed to doing that work.