From cbb0997470e153d4009ed7db6d175e055d1f6055 Mon Sep 17 00:00:00 2001 From: rekado Date: Sat, 24 Jan 2015 12:46:44 +0100 Subject: add function to double-space sentences --- lisp/init-my-stuff.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp/init-my-stuff.el') diff --git a/lisp/init-my-stuff.el b/lisp/init-my-stuff.el index 9a1bf2d..e42f4bc 100644 --- a/lisp/init-my-stuff.el +++ b/lisp/init-my-stuff.el @@ -85,3 +85,11 @@ Position the cursor at its beginning, according to the current mode." (abort-recursive-edit))) (add-hook 'mouse-leave-buffer-hook 'my/stop-using-minibuffer) + +(defun my/fix-sentence (arg) + "Add space to the end of a sentence." + (interactive "p") + (let ((sentence-end-double-space nil)) + (loop for i from 1 to arg do + (forward-sentence 1) + (insert " ")))) -- cgit v1.2.3