[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fb4f2aa038: * lisp/textmodes/paragraphs.el (repunctuate-sentences
From: |
jakanakaevangeli |
Subject: |
master fb4f2aa038: * lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function. |
Date: |
Tue, 04 Jan 2022 18:21:56 +0100 |
> +(defun repunctuate-sentences-filter (_start _end)
> + "Search filter used by `repunctuate-sentences' to skip unneeded spaces.
> +By default, it skips occurrences that already have two spaces.
> +It is advised to put `advice-add' on this function to add more filters,
> +for example, `(looking-back (rx (or \"e.g.\" \"i.e.\") \" \") 5)'
> +with a set of predefined abbreviations to skip from adding two spaces."
> + (not (length= (match-string 4) 2)))
Similarly to filter-buffer-substring-function, I believe it would be
better if this was a variable, on which 'add-function' could be used.
This would make it easier to set buffer locally if needed.
- master fb4f2aa038: * lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function.,
jakanakaevangeli <=