unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: help-gnu-emacs@gnu.org
Subject: Re: package: iPhone behavior insert . After a word and twice space
Date: Sun, 26 Nov 2017 20:29:06 +0100	[thread overview]
Message-ID: <87609won3x.fsf@mat.ucm.es> (raw)
In-Reply-To: 87indxf4je.fsf@mat.ucm.es

>>> "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	other threads:[~2017-11-26 19:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 15:22 package: iPhone behavior insert . After a word and twice space Uwe Brauer
2017-11-26 19:29 ` Uwe Brauer [this message]
     [not found] ` <mailman.4600.1511724569.27995.help-gnu-emacs@gnu.org>
2017-11-26 20:27   ` Thorsten Bonow
2017-11-26 20:53     ` Uwe Brauer
2017-11-26 21:28     ` Hi-Angel
2017-11-26 23:21       ` Emanuel Berg
2017-11-27  4:56         ` Hi-Angel
2017-11-28 20:36           ` Emanuel Berg
2017-11-26 22:06 ` Emanuel Berg
     [not found] <mailman.4578.1511709783.27995.help-gnu-emacs@gnu.org>
2017-11-26 18:53 ` Thorsten Bonow
2017-11-26 20:57   ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87609won3x.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).