diff options
| author | Richard M. Stallman | 2003-05-23 12:46:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-05-23 12:46:38 +0000 |
| commit | d320a41dbf4b6849f4b37b37fd7c9c6fea3a417f (patch) | |
| tree | 98368f29fc6f3fc7f26bab3f6dc1a3faebc3d26a | |
| parent | a28fe04bbd2585275fa0b2b5961f5de47304d36d (diff) | |
| download | emacs-d320a41dbf4b6849f4b37b37fd7c9c6fea3a417f.tar.gz emacs-d320a41dbf4b6849f4b37b37fd7c9c6fea3a417f.zip | |
(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." | |||
| 420 | (setq arg (1- arg))) | 420 | (setq arg (1- arg))) |
| 421 | (constrain-to-field nil opoint t))) | 421 | (constrain-to-field nil opoint t))) |
| 422 | 422 | ||
| 423 | (defun repunctuate-sentences () | ||
| 424 | (interactive) | ||
| 425 | "Put two spaces at the end of sentences from point to the end of buffer. | ||
| 426 | It works using `query-replace-regexp'." | ||
| 427 | (query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" | ||
| 428 | "\\1\\2\\3 ")) | ||
| 429 | |||
| 430 | |||
| 423 | (defun backward-sentence (&optional arg) | 431 | (defun backward-sentence (&optional arg) |
| 424 | "Move backward to start of sentence. With arg, do it arg times. | 432 | "Move backward to start of sentence. With arg, do it arg times. |
| 425 | See `forward-sentence' for more information." | 433 | See `forward-sentence' for more information." |