[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto correction propagation mode
From: |
Plamen Tanovski |
Subject: |
Re: auto correction propagation mode |
Date: |
Sat, 07 Jun 2008 23:05:16 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
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.
Best regards