diff --git a/users/crumb/programs/emacs/modules/syd-tabs.el b/users/crumb/programs/emacs/modules/syd-tabs.el index 1696b42..6bf9ce5 100644 --- a/users/crumb/programs/emacs/modules/syd-tabs.el +++ b/users/crumb/programs/emacs/modules/syd-tabs.el @@ -25,6 +25,8 @@ (defvar syd-tab-bar-name-function #'syd-tab-bar-make-free-name "Nullary function expected to return the name for a new tab.") + (defvar syd-tab-bar-default-buffer-function #'scratch-buffer) + (syd-add-hook 'tab-bar-tab-post-open-functions (defun syd-tab-bar--name-new-tab-h (tab) "Hooks to `tab-bar-tab-post-open-functions' such that new tabs will be @@ -34,7 +36,9 @@ given \"explicit names\" that are static." "Show the tab-bar if it is not already visible. See `syd-tab-bar-hide-tab-bar-h'." (unless vim-tab-bar-mode - (vim-tab-bar-mode 1)))) + (vim-tab-bar-mode 1))) + (defun syd-tab-bar--switch-to-default-buffer-h (_tab) + (switch-to-buffer (funcall syd-tab-bar-default-buffer-function)))) (syd-add-hook 'tab-bar-tab-pre-close-functions (defun syd-tab-bar-hide-tab-bar-h (_tab _final-tab-p)