Created
January 6, 2012 00:57
-
-
Save smerritt/1568273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Take all the windows in the current frame and shift them over one. | |
;; | |
;; With 2 windows, effectively switches their positions. | |
;; | |
;; With 1 window, this is a no-op. | |
(defun rotate-windows () | |
(interactive) | |
(let ((buffers (mapcar 'window-buffer (window-list)))) | |
(mapcar* 'set-window-buffer | |
(window-list) | |
(append (cdr buffers) (list (car buffers)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment