Function: tab-bar--tab
tab-bar--tab is a byte-compiled function defined in tab-bar.el.gz.
Signature
(tab-bar--tab &optional FRAME)
Documentation
Make a new tab data structure that can be added to tabs on the FRAME.
Source Code
;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar--tab (&optional frame)
"Make a new tab data structure that can be added to tabs on the FRAME."
(let* ((tab (tab-bar--current-tab-find nil frame))
(tab-explicit-name (alist-get 'explicit-name tab))
(tab-group (alist-get 'group tab))
(bl (seq-filter #'buffer-live-p (frame-parameter
frame 'buffer-list)))
(bbl (seq-filter #'buffer-live-p (frame-parameter
frame 'buried-buffer-list))))
`(tab
(name . ,(if tab-explicit-name
(alist-get 'name tab)
(funcall tab-bar-tab-name-function)))
(explicit-name . ,tab-explicit-name)
,@(if tab-group `((group . ,tab-group)))
(time . ,(float-time))
(ws . ,(window-state-get
(frame-root-window (or frame (selected-frame))) 'writable))
(wc . ,(current-window-configuration))
(wc-point . ,(point-marker))
(wc-bl . ,bl)
(wc-bbl . ,bbl)
(wc-history-back . ,(gethash (or frame (selected-frame))
tab-bar-history-back))
(wc-history-forward . ,(gethash (or frame (selected-frame))
tab-bar-history-forward))
;; Copy other possible parameters
,@(mapcan (lambda (param)
(unless (memq (car param)
'(name explicit-name group time
ws wc wc-point wc-bl wc-bbl
wc-history-back wc-history-forward))
(list param)))
(cdr tab)))))