aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/tab-line.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index c98b1cfce61..d080da1867d 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -415,11 +415,10 @@ variable `tab-line-tabs-function'."
415 next-buffers)))) 415 next-buffers))))
416 416
417 417
418(defun tab-line-format () 418(defun tab-line-format-template (tabs)
419 "Template for displaying tab line for selected window." 419 "Template for displaying tab line for selected window."
420 (let* ((window (selected-window)) 420 (let* ((window (selected-window))
421 (selected-buffer (window-buffer window)) 421 (selected-buffer (window-buffer window))
422 (tabs (funcall tab-line-tabs-function))
423 (separator (or tab-line-separator (if window-system " " "|"))) 422 (separator (or tab-line-separator (if window-system " " "|")))
424 (hscroll (window-parameter nil 'tab-line-hscroll)) 423 (hscroll (window-parameter nil 'tab-line-hscroll))
425 (strings 424 (strings
@@ -470,6 +469,14 @@ variable `tab-line-tabs-function'."
470 (list (concat separator (when tab-line-new-tab-choice 469 (list (concat separator (when tab-line-new-tab-choice
471 tab-line-new-button))))))) 470 tab-line-new-button)))))))
472 471
472(defun tab-line-format ()
473 "Template for displaying tab line for selected window."
474 (let ((tabs (funcall tab-line-tabs-function))
475 (cache (window-parameter nil 'tab-line-cache)))
476 (or (and cache (equal (car cache) tabs) (cdr cache))
477 (cdr (set-window-parameter nil 'tab-line-cache
478 (cons tabs (tab-line-format-template tabs)))))))
479
473 480
474(defcustom tab-line-auto-hscroll t 481(defcustom tab-line-auto-hscroll t
475 "Allow or disallow automatic horizontal scrolling of the tab line. 482 "Allow or disallow automatic horizontal scrolling of the tab line.