Function: tab-bar-format-align-right
tab-bar-format-align-right is a byte-compiled function defined in
tab-bar.el.gz.
Signature
(tab-bar-format-align-right)
Documentation
Align the rest of tab bar items to the right.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar-format-align-right ()
"Align the rest of tab bar items to the right."
(let* ((rest (cdr (memq 'tab-bar-format-align-right tab-bar-format)))
(rest (tab-bar-format-list rest))
(rest (mapconcat (lambda (item) (nth 2 item)) rest ""))
(hpos (progn
(add-face-text-property 0 (length rest) 'tab-bar t rest)
(string-pixel-width rest)))
(str (propertize " " 'display
;; The `right' spec doesn't work on TTY frames
;; when windows are split horizontally (bug#59620)
(if (window-system)
`(space :align-to (- right (,hpos)))
`(space :align-to (,(- (frame-inner-width)
hpos)))))))
`((align-right menu-item ,str ignore))))