[OS X Emacs] prose writing productivity in Aquamacs

Peter Salazar cycleofsong at gmail.com
Thu Jan 24 16:22:13 EST 2013


OK, this seems to work...

(defun  my-flyspell-auto-correct-and-space ()
  (interactive)
  (flyspell-auto-correct-word)    ;; Auto-correct the word at point
  (when (not (or (looking-at " ") ;; If after the correction we are in the
                 (eolp)))         ;; middle of the word, forward to the end
      (forward-word))             ;; of the word.
  (insert " "))                   ;; insert a space

...except for one part—how to bind the SPC key to this function?

I tried this...

(global-set-key "SPC" 'my-flyspell-auto-correct-and-space)

...but that doesn't work.

(Thanks to Robin Joy for the solution:
http://superuser.com/questions/540942/is-it-possible-to-auto-correct-spelling-on-space-in-emacs
)


On Tue, Jan 22, 2013 at 7:56 PM, David Reitter <david.reitter at gmail.com>wrote:

> On Jan 22, 2013, at 6:57 PM, Peter Salazar <cycleofsong at gmail.com> wrote:
>
> > 1. I wish there were a way so that when I mistype a word, flyspell could
> autocorrect it to the "most likely" correction. When I mistype a word and
> then hit OPTION-TAB to correct it, flyspell ALMOST ALWAYS picks the correct
> correction by default as the main suggestion. I want flyspell to do this
> with every word I mistype, WITHOUT my having to hit OPTION-TAB. Possible?
>
> I sketched this functionality out about a year ago:
>
> http://email.esm.psu.edu/pipermail/macosx-emacs/2012-February/003178.html
>
> With a few changes, this could be useful.
>
>
>     --
> http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
> http://aquamacs.org/donate -- Could we help you? Return the favor and
> support the Aquamacs Project!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20130124/7d68396f/attachment.html>


More information about the MacOSX-Emacs mailing list