diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-05-23 12:46:38 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-05-23 12:46:38 +0000 |
commit | 1dabfb9e6eec83961d96442f483fb079de62d1d4 (patch) | |
tree | 9015711b2842843e05974fcb647269eedd6bac56 | |
parent | dfe85c0bd04d7b9a6596e6ed040a3f025da46e3c (diff) | |
download | emacs-1dabfb9e6eec83961d96442f483fb079de62d1d4.tar.gz |
(repunctuate-sentences): New function.
-rw-r--r-- | lisp/textmodes/paragraphs.el | 8 |
1 files changed, 8 insertions, 0 deletions
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." |