Stefan Monnier writes: > I recommend you first finish the current patch and take on that > plan afterwards. > What I'm asking is a fairly small refactoring of the code you sent, > I think. Please, find attached a new version of the patch. It contains the following changes: - Add a new function named `fill-region-as-paragraph-semlf', which fills a region using semantic linefeeds as if it were a single paragraph. Its behavior is analogous to `fill-region-as-paragraph'. - Update the `fill-paragraph-semlf' function to use `fill-region-as-paragraph-semlf' internally. - Remove the mention about using `fill-paragraph-semlf' as `fill-paragraph-function' from docs, given that the long term plan is to obsolete this. - Add test for `fill-region-as-paragraph-semlf'. Thanks a lot for all the explanations. I hope this new version is closer to what you had in mind. Roi