Emacs Hacking, reverse other buffer

This entry was posted by tbielawa on Sunday, 18 October, 2009 at

I started reading Writing GNU Emacs Extensions by Bob Glickstein. The first real meaty example you work through in it is making an ‘other-buffer’ like key command that works in reverse. So here I present to the internet, my version of previous-window.

(defun previous-window ()
  "As other-buffer, except in the other-direction"
  (interactive)
  (other-window -1))
 
(global-set-key "\C-c\o" 'previous-window)

Put in your .emacs file and activate with C-c o when you have multiple frames open at once.

One Response to “Emacs Hacking, reverse other buffer”

  1. Of course, if you’re not into that you can just simple C-u -1 RET C-x o RET


Leave a Reply