>> I tested this patch, and it works well: > > Great! And I agree with Eli's comment -- a separate wrapper command > that just takes an event would be a clearer interface. I noticed that using the mouse-wheel on images is not responsive enough. It takes too much time when every step of the mouse scrolling wheel needs to scale the image separately for every consecutive rescaling. So I experimented with debouncing - a new macro 'debounce' swallows all intermediate calls in quick succession to 'image--change-size', and executes only the last call in sequence. But actually it requires another better macro 'debounce-reduce' that accumulates the state from all calls by multiplying all intermediate scaling factors, and using the result on the final call: