Possible Duplicate:
Emacs, switch to previous window
other-window advances me to the next window in the current frame, but I also want a way to move back to the previous window.
Emacs has next-buffer and previous-buffer, but no analogous interactive functions for window navigation. Just other-window.
Provide a negative argument with C-u - (‘Control+U’ then ‘minus’), or even more simply C-- (‘Control minus’).
From code,
(other-window -1)or(other-frame -1)will do the same thing.Check out the help for the key you want to reverse (e.g. C-h k C-x o to show help for C-x o) and if it says ‘A negative argument…’ you know you can use C--.