Function: tab-bar--update-tab-bar-lines

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

Signature

(tab-bar--update-tab-bar-lines &optional FRAMES)

Documentation

Update the tab-bar-lines frame parameter in FRAMES.

If the optional parameter FRAMES is omitted, update only the currently selected frame. If it is t, update all frames as well as the default for new frames. Otherwise FRAMES should be a list of frames to update.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar--update-tab-bar-lines (&optional frames)
  "Update the `tab-bar-lines' frame parameter in FRAMES.
If the optional parameter FRAMES is omitted, update only
the currently selected frame.  If it is t, update all frames
as well as the default for new frames.  Otherwise FRAMES should be
a list of frames to update."
  (let ((frame-lst (cond ((null frames)
                          (list (selected-frame)))
                         ((eq frames t)
                          (frame-list))
                         (t frames))))
    ;; Loop over all frames and update `tab-bar-lines'
    (dolist (frame frame-lst)
      (unless (or (frame-parameter frame 'tab-bar-lines-keep-state)
                  (and (eq auto-resize-tab-bars 'grow-only)
                       (> (frame-parameter frame 'tab-bar-lines) 1))
                  ;; Don't enable tab-bar in daemon's initial frame.
                  (and (daemonp) (eq frame terminal-frame)))
        (set-frame-parameter frame 'tab-bar-lines
                             (tab-bar--tab-bar-lines-for-frame frame)))))
  ;; Update `default-frame-alist'
  (when (eq frames t)
    (setq default-frame-alist
          (cons (cons 'tab-bar-lines
                      (if (and tab-bar-mode (eq tab-bar-show t)) 1 0))
                (assq-delete-all 'tab-bar-lines default-frame-alist)))))