Created
December 1, 2008 04:38
-
-
Save yaotti/30623 to your computer and use it in GitHub Desktop.
This file contains 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
;; http://www.bookshelf.jp/soft/meadow_30.html#SEC400 | |
(defun swap-screen() | |
"Swap two screen,leaving cursor at current window." | |
(interactive) | |
(let ((thiswin (selected-window)) | |
(nextbuf (window-buffer (next-window)))) | |
(set-window-buffer (next-window) (window-buffer)) | |
(set-window-buffer thiswin nextbuf))) | |
(defun swap-screen-with-cursor() | |
"Swap two screen,with cursor in same buffer." | |
(interactive) | |
(let ((thiswin (selected-window)) | |
(thisbuf (window-buffer))) | |
(other-window 1) | |
(set-window-buffer thiswin (window-buffer)) | |
(set-window-buffer (selected-window) thisbuf))) | |
(define-key global-map (kbd "C-x m") 'swap-screen) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment