*** The key prefix 'C-x t t' displays next command buffer in a new tab.
+*** The tab bar is frame-local when 'tab-bar-show' is a number.
+Show/hide the tab bar independently for each frame, according to the
+value of 'tab-bar-show'.
+
** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and
'previous-error-no-select' bound to 'p'.
(run-hook-with-args 'tab-bar-tab-post-open-functions
(nth to-index tabs)))
- (when (and (not tab-bar-mode)
- (or (eq tab-bar-show t)
- (and (natnump tab-bar-show)
- (> (length tabs) tab-bar-show))))
+ (cond
+ (tab-bar-mode)
+ ((eq tab-bar-show t)
(tab-bar-mode 1))
+ ((and (natnump tab-bar-show)
+ (> (length (funcall tab-bar-tabs-function)) tab-bar-show)
+ (zerop (frame-parameter nil 'tab-bar-lines)))
+ (set-frame-parameter nil 'tab-bar-lines 1)))
(force-mode-line-update)
(unless tab-bar-mode
tab-bar-closed-tabs)
(set-frame-parameter nil 'tabs (delq close-tab tabs)))
- (when (and tab-bar-mode
- (and (natnump tab-bar-show)
- (<= (length tabs) tab-bar-show)))
- (tab-bar-mode -1))
+ (when (and (not (zerop (frame-parameter nil 'tab-bar-lines)))
+ (natnump tab-bar-show)
+ (<= (length (funcall tab-bar-tabs-function))
+ tab-bar-show))
+ (set-frame-parameter nil 'tab-bar-lines 0))
(force-mode-line-update)
(unless tab-bar-mode
(run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index tabs) nil)))
(set-frame-parameter nil 'tabs (list (nth current-index tabs)))
- (when (and tab-bar-mode
- (and (natnump tab-bar-show)
- (<= 1 tab-bar-show)))
- (tab-bar-mode -1))
+ (when (and (not (zerop (frame-parameter nil 'tab-bar-lines)))
+ (natnump tab-bar-show)
+ (<= (length (funcall tab-bar-tabs-function))
+ tab-bar-show))
+ (set-frame-parameter nil 'tab-bar-lines 0))
(force-mode-line-update)
(unless tab-bar-mode