Function: repunctuate-sentences
repunctuate-sentences is an interactive and byte-compiled function
defined in paragraphs.el.gz.
Signature
(repunctuate-sentences &optional NO-QUERY)
Documentation
Put two spaces at the end of sentences from point to the end of buffer.
It works using query-replace-regexp.
If optional argument NO-QUERY is non-nil, make changes without
asking for confirmation.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/paragraphs.el.gz
(defun repunctuate-sentences (&optional no-query)
"Put two spaces at the end of sentences from point to the end of buffer.
It works using `query-replace-regexp'.
If optional argument NO-QUERY is non-nil, make changes without
asking for confirmation."
(interactive)
(let ((regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +")
(to-string "\\1\\2\\3 "))
(if no-query
(while (re-search-forward regexp nil t)
(replace-match to-string))
(query-replace-regexp regexp to-string))))