On 2023-06-09 17:03, Stefan Monnier wrote: > Also, the code is fairly simple and self-contained, so I don't see > a good reason not to include that. Thanks :) > I think symbols like `right-fringe` should be enclosed in `...' > in docstrings. Fixed in new patch, attached. > Also, I see no reason to encourage the use of an alias, > so I'd drop either `right-margin` or `right` from the doc (especially > since it doesn't really come for free in the code). Fixed. Dropped `right', as it was the less descriptive version. > As a user I'd wonder if "align to right-fringe" means to align to > the beginning (i.e. left side) or end (i.e. right side) of the > right fringe. Documented (and included a link to relevant info node). > AFAICT, this function is internal to the implementation of the > `mode-line-format-right-align` mode-line spec. So maybe it should use > "--" in its name. You're right -- Done. > This is the ugly part of the implementation Yes, I agree :( > an alternative is to use > > (..LEFT.. (:eval (mode-line-format-right-align ..RIGHT..))) I share your technical worries about this. I worry too that this might end up being more confusing for users, because it invites such constructions as: (..LEFT.. (:eval (mode-line-format-right-align ..RIGHT..)) ..WHAT..) Where the behaviour of ..WHAT.. is at best to be completely hidden, and at worst undefined. If we use a single symbol, this can't happen. I also think that, as a user, it's good to have consistent interfaces for this sort of thing, and my proposed function is intended to work just like `tab-bar-format-align-right', which is included as a symbol, not a more complex construction. > should also be usable in `header-line-format` and friends. This would good though. Hugo