]> git.eshelyaron.com Git - emacs.git/commitdiff
(repunctuate-sentences): New function.
authorRichard M. Stallman <rms@gnu.org>
Fri, 23 May 2003 12:46:38 +0000 (12:46 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 23 May 2003 12:46:38 +0000 (12:46 +0000)
lisp/textmodes/paragraphs.el

index dfec0acfd46b007584af62b2d538ab701a641db2..735eeca3e2ac9cc8102d8b886f147f2aaba62fc7 100644 (file)
@@ -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."