help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package: iPhone behavior insert . After a word and twice space


From: Uwe Brauer
Subject: Re: package: iPhone behavior insert . After a word and twice space
Date: Sun, 26 Nov 2017 20:29:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

"Uwe" == Uwe Brauer <oub@mat.ucm.es> writes:

> Hi > Mi iphone has the nice feature that if I press space quickly > twice after a word it inserts a . Since it is considered as a > end of sentence. > Does anybody now about a Emacs package providing this > functionality?
I found this:

https://emacs.stackexchange.com/questions/3941/when-typing-automatically-transform-spc-spc-into-period-spc-spc

(defun freaky-space () (interactive) (cond ((looking-back "\\(?:^\\|\\.\\) +") (insert " ")) ((eq this-command last-command) (backward-delete-char 1) (insert ". ")) (t (insert " "))))
(define-key text-mode-map " " 'freaky-space)

Not bad.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]