[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug 130397
From: |
Kenichi Handa |
Subject: |
Re: Bug 130397 |
Date: |
Wed, 19 Jan 2005 21:52:09 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Juri Linkov <address@hidden> writes:
> Now a new problem was uncovered: after selecting a correct word from
> a list of near misses returned from ispell, ispell.el replaces the
> misspelled word with a selected word, and inserts it into the buffer
> not in its original mule-unicode charset, but in iso8859.
Perhaps the following function can be utilized somewhere in
ispell to do that, but, as I still don't understand ispell
code that much, I'd like to ask someone else to modify
ispell to use it.
;; Destructively modify WORD by converting each character in it to the
;; equivalent character of CHARSET.
(defun ispell-adjust-charset (word charset)
(let ((len (length word)))
(if (< len (string-bytes word))
(dotimes (i len)
(let ((c (aref word i))
this-charset equiv-chars)
(if (and (>= c 128)
(not (eq (setq this-charset (char-charset c)) charset))
(or (memq this-charset '(mule-unicode-0100-24ff
mule-unicode-2500-34ff))
(setq c (aref ucs-mule-8859-to-mule-unicode c)))
(setq equivs (aref ispell-unified-chars-table c)))
(catch 'tag
(dotimes (j (length equiv-chars))
(when (eq (char-charset (aref equiv-chars j)) charset)
(aset word i (aref equiv-chars j))
(throw 'tag nil))))))))))
---
Ken'ichi HANDA
address@hidden
PS. I personally feel it's a waste of time to struggle with
charset matters in ispell that much because emacs-unicode
should not have such a problem.
- Re: Bug 130397, (continued)
- Re: Bug 130397, Peter Heslin, 2005/01/08
- Re: Bug 130397, Agustin Martin, 2005/01/07
- Re: Bug 130397, Juri Linkov, 2005/01/07
- Re: Bug 130397, Kenichi Handa, 2005/01/13
- Re: Bug 130397, Juri Linkov, 2005/01/18
- Re: Bug 130397, Geoff Kuenning, 2005/01/18
- Re: Bug 130397, Juri Linkov, 2005/01/19
- Re: Bug 130397, Geoff Kuenning, 2005/01/19
- Re: Bug 130397, Kenichi Handa, 2005/01/18
- Re: Bug 130397, Juri Linkov, 2005/01/19
- Re: Bug 130397,
Kenichi Handa <=
- Re: Bug 130397, David Kastrup, 2005/01/19
- Re: Bug 130397, Ken Stevens, 2005/01/07
Re: Bug 130397 (Was: Emacs - Ispell problem with i[no]german dictionary), Agustin Martin, 2005/01/07