(require 'cl)
(defun my-tabbar-select-tab-by-number (n)
"Select Nth tab."
(interactive "p")
(let* ((tabset (tabbar-current-tabset t))
(tab (tabbar-selected-tab tabset))
previous)
(when (and tabset (numberp n) (<= 1 n))
(while (setq previous (tabbar-tab-next tabset tab t))
(setq tab previous))
(loop for i from 1 below n
do (setq tab (tabbar-tab-next tabset tab))
unless (tabbar-tab-next tabset tab) return nil)
(tabbar-click-on-tab tab))))
(loop for i from 1 to 9
for fn = (intern (format "my-tabbar-select-tab-%d" i))
do
(fset fn `(lambda () (interactive) (my-tabbar-select-tab-by-number ,i)))
(global-set-key (read-kbd-macro (format "s-%d" i)) fn))