OK, this seems to work...<div><br></div><div><div>(defun  my-flyspell-auto-correct-and-space ()</div><div>  (interactive)</div><div>  (flyspell-auto-correct-word)    ;; Auto-correct the word at point</div><div>  (when (not (or (looking-at " ") ;; If after the correction we are in the</div>
<div>                 (eolp)))         ;; middle of the word, forward to the end</div><div>      (forward-word))             ;; of the word.</div><div>  (insert " "))                   ;; insert a space</div><div>
<br></div><div>...except for one part—how to bind the SPC key to this function?</div><div><br></div><div>I tried this...</div><div><br></div><div><div>(global-set-key "SPC" 'my-flyspell-auto-correct-and-space)</div>
</div><div><br></div><div>...but that doesn't work.</div><div><br></div><div>(Thanks to Robin Joy for the solution: <a href="http://superuser.com/questions/540942/is-it-possible-to-auto-correct-spelling-on-space-in-emacs">http://superuser.com/questions/540942/is-it-possible-to-auto-correct-spelling-on-space-in-emacs</a>)</div>
<div><br></div><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 7:56 PM, David Reitter <span dir="ltr"><<a href="mailto:david.reitter@gmail.com" target="_blank">david.reitter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Jan 22, 2013, at 6:57 PM, Peter Salazar <<a href="mailto:cycleofsong@gmail.com">cycleofsong@gmail.com</a>> wrote:<br>
<br>
> 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?<br>

<br>
</div>I sketched this functionality out about a year ago:<br>
<br>
<a href="http://email.esm.psu.edu/pipermail/macosx-emacs/2012-February/003178.html" target="_blank">http://email.esm.psu.edu/pipermail/macosx-emacs/2012-February/003178.html</a><br>
<br>
With a few changes, this could be useful.<br>
<br>
<br>
    --<br>
<a href="http://aquamacs.org" target="_blank">http://aquamacs.org</a> -- Aquamacs: Emacs on Mac OS X<br>
<a href="http://aquamacs.org/donate" target="_blank">http://aquamacs.org/donate</a> -- Could we help you? Return the favor and support the Aquamacs Project!<br>
</blockquote></div><br></div>