about summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-07-30T01·45-0400
committerWilliam Carroll <wpcarro@gmail.com>2017-07-30T01·45-0400
commit84789f0c334e4f3aaed19dbf67ada81c093ed2ef (patch)
treeac92bdd74b268e40a91c5570a6ef4efe0e8a6dba /emacs
parent3cc2f2bf62918a5f6ea2287ffbc4c6b02aa240ed (diff)
Defines fn to conditionally activate emacs tabbar
Diffstat (limited to 'emacs')
-rw-r--r--emacs/wc-tabbar-functions.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/wc-tabbar-functions.el b/emacs/wc-tabbar-functions.el
new file mode 100644
index 000000000000..26ccf044a809
--- /dev/null
+++ b/emacs/wc-tabbar-functions.el
@@ -0,0 +1,7 @@
+;;; Code
+(defun wc/conditionally-activate-tabbar ()
+  "Only activate tabbar-mode if the new major-mode is whitelisted."
+  (setq tabbar-whitelist '(prog-mode))
+  (if (memq major-mode tabbar-whitelist)
+      (tabbar-local-mode 1)
+    (tabbar-local-mode nil)))