- Package:
- gettext-el
- Source:
- gettext
- Submitter:
- Martin Quinson
- Date:
- 2005-07-18 04:02:52 UTC
- Severity:
- wishlist
Hello, I've done a few elisp function to have a ispell to work (only
on translated parts) in po mode.
Here they are :
(defun po-ispell-next ()
"Search the next entry to check"
(po-find-span-of-entry)
(let ((here (point)))
(goto-char po-end-of-entry)
(if (re-search-forward po-any-msgstr-regexp nil t)
(progn
(goto-char (match-beginning 0))
(po-current-entry)
t)
nil)))
(defun po-ispell-entry ()
"Check the current entry"
(po-find-span-of-entry)
(ispell-region (+ po-start-of-msgstr 6) po-end-of-entry))
(defun po-ispell ()
"Check the spelling of the po file"
(interactive)
(save-excursion
(save-restriction
(let ((buffer-read-only po-read-only))
(po-first-entry)
(while
(and (po-ispell-next)
(po-ispell-entry)))))))
The problem is that a new ispell process is launched for each entry...
It would be possible to use the same mechanism than (auc)tex, but I
failed. Would you manage it ?
Bye, Mt.
Hello François.
A lot of time ago I received this suggestion to get ispell to work on
po files. Is there a chance that something like this is included in a
future gettext release? (Bruno says he's not an Elisp programmer, and
neither am I, so we need your help :-).
Package: gettext
Version: 0.10.35-13
Severity: wishlist
Hello, I've done a few elisp function to have a ispell to work (only
on translated parts) in po mode.
Here they are :
(defun po-ispell-next ()
"Search the next entry to check"
(po-find-span-of-entry)
(let ((here (point)))
(goto-char po-end-of-entry)
(if (re-search-forward po-any-msgstr-regexp nil t)
(progn
(goto-char (match-beginning 0))
(po-current-entry)
t)
nil)))
(defun po-ispell-entry ()
"Check the current entry"
(po-find-span-of-entry)
(ispell-region (+ po-start-of-msgstr 6) po-end-of-entry))
(defun po-ispell ()
"Check the spelling of the po file"
(interactive)
(save-excursion
(save-restriction
(let ((buffer-read-only po-read-only))
(po-first-entry)
(while
(and (po-ispell-next)
(po-ispell-entry)))))))
The problem is that a new ispell process is launched for each entry...
It would be possible to use the same mechanism than (auc)tex, but I
failed. Would you manage it ?
Bye, Mt.