> If no one has a better idea for a simpler implementation, > then this patch fixes the problem by skipping the sentences > that already have two spaces at the end: The filter will also allow redefining it with own logic such as skipping known abbreviations that don't require two spaces, i.e., e.g.: (defun repunctuate-sentences-filter (_start _end) (not (or (length= (match-string 4) 2) (looking-back (rx (or "i.e." "e.g.") " ") 5))))