From: Richard M. Stallman Date: Fri, 23 May 2003 12:46:38 +0000 (+0000) Subject: (repunctuate-sentences): New function. X-Git-Tag: ttn-vms-21-2-B4~10018 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d320a41dbf4b6849f4b37b37fd7c9c6fea3a417f;p=emacs.git (repunctuate-sentences): New function. --- diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index dfec0acfd46..735eeca3e2a 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -420,6 +420,14 @@ sentences. Also, every paragraph boundary terminates sentences as well." (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."