I wanted to be able to right-align some elements of the mode-line. I used `tab-bar-format-align-right' as a base and modified it to work with the mode-line. The functin aligns to the right /fringe/ rather than the margin because some modes (e.g. [visual-fill-column-mode]) mess around the margin size, but the right-align should be unaffected by this. Patch attached. I want to know that the code is good before I do NEWS and docs etc. Obviously it would be useful to document this in info (elisp) Mode Line Variables and maybe in the `mode-line-format' docstring. Blue skies, Hugo [visual-fill-column-mode]