unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* master fb4f2aa038: * lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function.
@ 2022-01-04 17:21 jakanakaevangeli
  2022-01-04 18:03 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: jakanakaevangeli @ 2022-01-04 17:21 UTC (permalink / raw)
  To: juri; +Cc: emacs-devel

> +(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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-05 18:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 17:21 master fb4f2aa038: * lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function jakanakaevangeli
2022-01-04 18:03 ` Juri Linkov
2022-01-04 20:44   ` Stefan Monnier
2022-01-05 18:47     ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).