When semantic-stickyfunc-mode
is activated, the tabbar tabs are not visible.
I would like to write a function that show the tabs 2 seconds and then goes to semantic-stickyfunc-mode
.
I tried with this:
(defun timer-local-tabbar-show()
(if (eq major-mode 'python-mode)
(progn
(tabbar-local-mode -1)
(run-with-timer 2 nil (lambda () (tabbar-local-mode 1))))))
(add-hook 'window-configuration-change-hook 'timer-local-tabbar-show)
The tabs are shown, and then disappear (good ;-), but semantic-stickyFunc-mode
doesn't work (while semantic-stickyFunc-mode
variable is 1)
Thank you for any help.
EDIT:
(defvar my-header-line-format nil)
(defun timer-local-tabbar-show()
(if (eq major-mode 'python-mode)
(progn
(setq my-header-line-format header-line-format)
(tabbar-local-mode -1)
(run-with-timer 1.5 nil
(lambda ()
(tabbar-local-mode 1)
(setq header-line-format my-header-line-format)
(redisplay)
)))))
(add-hook 'window-configuration-change-hook 'timer-local-tabbar-show)
This version works better (thanks lawlist
) but there are somme persistent random problems.