Conditionally activates tabbar-mode
This commit is contained in:
parent
f92f70a711
commit
935ce33753
1 changed files with 11 additions and 0 deletions
|
@ -148,9 +148,20 @@
|
||||||
;; Tabbed buffer support
|
;; Tabbed buffer support
|
||||||
(use-package tabbar
|
(use-package tabbar
|
||||||
:ensure t
|
:ensure t
|
||||||
|
:init
|
||||||
|
(load "~/.emacs.d/wc-tabbar-functions.el")
|
||||||
:config
|
:config
|
||||||
(setq tabbar-hide-header-button t)
|
(setq tabbar-hide-header-button t)
|
||||||
(setq tabbar-use-images nil)
|
(setq tabbar-use-images nil)
|
||||||
|
|
||||||
|
(defun wc/conditionally-activate-tabbar ()
|
||||||
|
(if (and (derived-mode-p 'prog-mode)
|
||||||
|
(not (string-match-p "*" (buffer-name))))
|
||||||
|
(tabbar-local-mode -1)
|
||||||
|
(tabbar-local-mode 1)))
|
||||||
|
|
||||||
|
(add-hook 'after-change-major-mode-hook 'wc/conditionally-activate-tabbar)
|
||||||
|
|
||||||
(tabbar-mode))
|
(tabbar-mode))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue