Författare: Karl Eichwalder (keichwa_at_gmx.net)
Datum: 2003-05-22 06:17:08
"Göran Uddeborg" <goeran@uddeborg.pp.se> writes:
> This is not perfect in any way. Since the po file is in read only
> mode, you can only use it to detect misspellings, but not fix them
> on-the-fly in the ordinary ispell-mode way.
>
> (defun po-mode-ispell-pattern ()
> "Add ispell patterns so that only translated messages are checked."
> (make-variable-buffer-local 'ispell-skip-region-alist)
> (add-to-list 'ispell-skip-region-alist '("^msgid" . "^msgstr"))
> (add-to-list 'ispell-skip-region-alist '("^#[:,]" . "\n")))
> (add-hook 'po-mode-hook 'po-mode-ispell-pattern)
Great! Using this ispell wrapper seems to do the trick:
(defun po-ispell ()
(interactive)
(let ((buffer-read-only nil))
(ispell)))
Must find a way to advise ispell to do the buffer-read-only action on
its own...
A minor issue: it does not skip the keywords msgstr/msgid; work around:
add them to your dictionary.
--
| ,__o
http://www.gnu.franken.de/ke/ | _-\_<,
ke@suse.de (work) / keichwa@gmx.net (home) | (*)/'(*)
Arkiv genererat av hypermail pre-2.1.8.