From 84789f0c334e4f3aaed19dbf67ada81c093ed2ef Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 29 Jul 2017 21:45:35 -0400 Subject: [PATCH] Defines fn to conditionally activate emacs tabbar --- emacs/wc-tabbar-functions.el | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 emacs/wc-tabbar-functions.el diff --git a/emacs/wc-tabbar-functions.el b/emacs/wc-tabbar-functions.el new file mode 100644 index 000000000..26ccf044a --- /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)))