changeset 51159:7d324048f346

(repunctuate-sentences): New function.
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 May 2003 12:46:38 +0000
parents 00d0f607793b
children f7bc28024050
files lisp/textmodes/paragraphs.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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."