# HG changeset patch # User Richard M. Stallman # Date 1053693998 0 # Node ID 7d324048f346970a9aa93705859e8c244d6bb321 # Parent 00d0f607793bfb4d9e3cfcae25ba5df7a4b1fd28 (repunctuate-sentences): New function. diff -r 00d0f607793b -r 7d324048f346 lisp/textmodes/paragraphs.el --- a/lisp/textmodes/paragraphs.el Fri May 23 12:45:49 2003 +0000 +++ b/lisp/textmodes/paragraphs.el Fri May 23 12:46:38 2003 +0000 @@ -420,6 +420,14 @@ (setq arg (1- arg))) (constrain-to-field nil opoint t))) +(defun repunctuate-sentences () + (interactive) + "Put two spaces at the end of sentences from point to the end of buffer. +It works using `query-replace-regexp'." + (query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" + "\\1\\2\\3 ")) + + (defun backward-sentence (&optional arg) "Move backward to start of sentence. With arg, do it arg times. See `forward-sentence' for more information."