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

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

Re: auto correction propagation mode


From: Andreas Röhler
Subject: Re: auto correction propagation mode
Date: Sun, 8 Jun 2008 09:30:06 +0200
User-agent: KMail/1.9.6 (enterprise 20070904.708012)

Am Samstag, 7. Juni 2008 schrieb Plamen Tanovski:
> Andreas Röhler <andreas.roehler@online.de> writes:
> 
> > Just to indicate a direction how this could be done IMHO:
> >
> > (defun allkorr () 
> >   (interactive "*")
> >   (let* ((wap (word-at-point))
> >         (replmt (read-from-minibuffer "Correction: " wap)))
> >     (define-abbrev text-mode-abbrev-table wap replmt)
> >     (expand-region-abbrevs (point-min) (point-max))))
> >
> >
> > It uses the abbrev facility, prompts for the correct
> > word, which will be registered as an expansion for the
> > then wrong word, conceived as an abbrev in the text.
> >
> > `expand-region-abbrevs' will query you then for every
> > replacement. This might be abolished still, bound to an
> > argument etc.
> 
> 
> Thanks a lot. This is a very interessting approach. The best thing is, it
> works on whole words only.
> 

Yeah. And what's nice too: its all saved. Once corrected, it works every time 
as soon you call expand-all-abbrevs. So I will use that too now to correct 
repeating typos as Belrin for Berlin. Thanks back inspiring it. :)
 






reply via email to

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