Created
February 4, 2014 03:32
-
-
Save ShingoFukuyama/8797743 to your computer and use it in GitHub Desktop.
Stick/Lock buffer to window, compatible with tabbar.el. Emacs
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://lists.gnu.org/archive/html/help-gnu-emacs/2007-05/msg00975.html | |
(defvar sticky-buffer-previous-header-line-format) | |
(define-minor-mode sticky-buffer-mode | |
"Make the current window always display this buffer." | |
nil " sticky" nil | |
(if sticky-buffer-mode | |
(progn | |
(set (make-local-variable 'sticky-buffer-previous-header-line-format) | |
header-line-format) | |
(set-window-dedicated-p (selected-window) sticky-buffer-mode)) | |
(set-window-dedicated-p (selected-window) sticky-buffer-mode) | |
(setq header-line-format sticky-buffer-previous-header-line-format))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment