diff options
author | William Carroll <wpcarro@gmail.com> | 2017-07-02T02·54-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2017-07-02T02·54-0400 |
commit | 935ce33753fdba9c2714d2cd12f602eeb19cd938 (patch) | |
tree | 1885e7950f0c21c019503067de4f4b00213a2426 /configs | |
parent | f92f70a711af12180c95c9417cebbcf6686e7550 (diff) |
Conditionally activates tabbar-mode
Diffstat (limited to 'configs')
-rw-r--r-- | configs/shared/.emacs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configs/shared/.emacs b/configs/shared/.emacs index 04f6488907ab..3d382f484add 100644 --- a/configs/shared/.emacs +++ b/configs/shared/.emacs @@ -148,9 +148,20 @@ ;; Tabbed buffer support (use-package tabbar :ensure t + :init + (load "~/.emacs.d/wc-tabbar-functions.el") :config (setq tabbar-hide-header-button t) (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)) |