It looks like show-chunk and hide-chunk are never used, and the associated functions do not exist? I moved some code around as you suggested, and change my comment to be shorter and more to the point.