Function: tab-line-format

tab-line-format is a byte-compiled function defined in tab-line.el.gz.

Signature

(tab-line-format)

Documentation

Format for displaying the tab line of the selected window.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-line.el.gz
(defun tab-line-format ()
  "Format for displaying the tab line of the selected window."
  (let* ((tabs (funcall tab-line-tabs-function))
         (cache-key (funcall tab-line-cache-key-function tabs))
         (cache (window-parameter nil 'tab-line-cache)))
    ;; Enable auto-hscroll again after it was disabled on manual scrolling.
    ;; The moment to enable it is when the window-buffer was updated.
    (when (and tab-line-auto-hscroll        ; if auto-hscroll was enabled
               (integerp (nth 2 cache-key)) ; integer on manual scroll
               cache                        ; window-buffer was updated
               (not (equal (nth 1 (car cache)) (nth 1 cache-key))))
      (set-window-parameter nil 'tab-line-hscroll (float (nth 2 cache-key))))
    (or (and cache (equal (car cache) cache-key) (cdr cache))
        (cdr (set-window-parameter
              nil 'tab-line-cache
              (cons cache-key (tab-line-format-template tabs)))))))