* Automatic handling of TYpos
@ 2007-02-01 16:15 HS
2007-02-01 21:00 ` Peter Dyballa
[not found] ` <mailman.3886.1170363669.2155.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: HS @ 2007-02-01 16:15 UTC (permalink / raw)
To: help-gnu-emacs
Olá!
Is there any emacs function that I can turn on to fix THis KInd of
MIstakes automatically ?
Thanks!
HS
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatic handling of TYpos
2007-02-01 16:15 Automatic handling of TYpos HS
@ 2007-02-01 21:00 ` Peter Dyballa
[not found] ` <mailman.3886.1170363669.2155.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2007-02-01 21:00 UTC (permalink / raw)
To: HS; +Cc: help-gnu-emacs
Am 01.02.2007 um 17:15 schrieb HS:
> Is there any emacs function that I can turn on to fix THis KInd of
> MIstakes automatically ?
Flypsell?
--
Greetings
Pete
If all else fails read the instructions.
- Donald Knuth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatic handling of TYpos
[not found] ` <mailman.3886.1170363669.2155.help-gnu-emacs@gnu.org>
@ 2007-02-01 21:57 ` Charles philip Chan
0 siblings, 0 replies; 4+ messages in thread
From: Charles philip Chan @ 2007-02-01 21:57 UTC (permalink / raw)
To: help-gnu-emacs
On 1 Feb 2007, Peter_Dyballa@web.de wrote:
> Flypsell?
Or try use Predictive Mode:
http://www.emacswiki.org/cgi-bin/wiki/PredictiveMode
Charles
--
panic("No information about myself?");
linux-2.6.6/arch/mips/sgi-ip27/ip27-timer.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Automatic handling of TYpos
@ 2007-02-02 7:34 martin rudalics
0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2007-02-02 7:34 UTC (permalink / raw)
To: hugows; +Cc: help-gnu-emacs
> Is there any emacs function that I can turn on to fix THis KInd of
> MIstakes automatically ?
In your example there are actually _two_ kinds of "mistakes". One kind
is that you capitalize words like "this" or "kind" in the middle of a
sentence. There's no simple solution to that. The other mistake is
that of an upper-case character in the second position of a word.
Correcting the latter should not be difficult with flyspell. Try adding
code like the 100% untested below to `flyspell-incorrect-hook' (and be
aware of the fact that auto-correction is something you'll hardly notice
while typing).
(defun flyspell-maybe-downcase-second-character (beg end guesses)
"Try to downcase second character."
(when (consp guesses)
(let ((string (buffer-substring beg end))
second)
(when (and (> (- end beg) 1)
(not (equal (aref string 0) (downcase (aref string 0))))
(not (equal (aref string 1) (downcase (aref string 1)))))
(setq string
(concat
(substring string 0 1)
(setq second (downcase (substring string 1 2)))
(substring string 2)))
(catch 'done
(dolist (guess guesses)
(when (string-equal string guess)
(goto-char (1+ beg))
(insert second)
(delete-char 1)
(throw 'done t))))))))
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-02 7:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-01 16:15 Automatic handling of TYpos HS
2007-02-01 21:00 ` Peter Dyballa
[not found] ` <mailman.3886.1170363669.2155.help-gnu-emacs@gnu.org>
2007-02-01 21:57 ` Charles philip Chan
-- strict thread matches above, loose matches on Subject: below --
2007-02-02 7:34 martin rudalics
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).