Created
July 11, 2012 21:14
-
-
Save mccraigmccraig/3093582 to your computer and use it in GitHub Desktop.
mark an emacs window as unavailable for other content
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
;; pin windows | |
(defun toggle-window-dedicated () | |
"Toggle whether the current active window is dedicated or not" | |
(interactive) | |
(message | |
(if (let (window (get-buffer-window (current-buffer))) | |
(set-window-dedicated-p window | |
(not (window-dedicated-p window)))) | |
"Window '%s' is dedicated" | |
"Window '%s' is normal") | |
(current-buffer))) | |
(global-set-key (kbd "C-c w d") 'toggle-window-dedicated) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment