Function: tab-bar-tabs

tab-bar-tabs is a byte-compiled function defined in tab-bar.el.gz.

Signature

(tab-bar-tabs &optional FRAME)

Documentation

Return a list of tabs belonging to the FRAME.

Ensure the frame parameter tabs is pre-populated. Update the current tab name when it exists. Return its existing value or a new value.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar-tabs (&optional frame)
  "Return a list of tabs belonging to the FRAME.
Ensure the frame parameter `tabs' is pre-populated.
Update the current tab name when it exists.
Return its existing value or a new value."
  (let ((tabs (frame-parameter frame 'tabs)))
    (if tabs
        (let* ((current-tab (tab-bar--current-tab-find tabs))
               (current-tab-name (assq 'name current-tab))
               (current-tab-explicit-name (assq 'explicit-name current-tab)))
          (when (and current-tab-name
                     current-tab-explicit-name
                     (not (cdr current-tab-explicit-name)))
            (setf (cdr current-tab-name)
                  (funcall tab-bar-tab-name-function))))
      ;; Create default tabs
      (setq tabs (list (tab-bar--current-tab-make)))
      (tab-bar-tabs-set tabs frame)
      (run-hook-with-args 'tab-bar-tab-post-open-functions
                          (car tabs)))
    tabs))