When aw-switch-buffer-other-window is executed, it switches to the
selected window, changes the buffer, and then switches back. If the
buffer-switching function is canceled, the window won't get switched
back. Using unwind-protect ensures that the function ends with the
starting window selected.
I've had a few changes sitting around for a while, but I couldn't submit because of the copyright thing. But I signed the papers recently, so that's no problem now.
When aw-switch-buffer-other-window is executed, it switches to the selected window, changes the buffer, and then switches back. If the buffer-switching function is canceled, the window won't get switched back. Using unwind-protect ensures that the function ends with the starting window selected.