From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Bug 130397 Date: Wed, 19 Jan 2005 21:52:09 +0900 (JST) Message-ID: <200501191252.VAA13392@etlken.m17n.org> References: <20040517120658.GA6919@agmartin.aq.upm.es> <20041217121515.GA2270@agmartin.aq.upm.es> <200412221237.VAA07262@etlken.m17n.org> <20041222171306.GA4462@agmartin.aq.upm.es> <200501041250.VAA10883@etlken.m17n.org> <200501050200.LAA12589@etlken.m17n.org> <873bxgjxrp.fsf-monnier+emacs@gnu.org> <200501050550.OAA13142@etlken.m17n.org> <20050107153618.GA1508@agmartin.aq.upm.es> <878y7553qd.fsf@jurta.org> <200501130559.OAA12786@etlken.m17n.org> <878y6rnhd3.fsf@jurta.org> <200501182324.IAA10189@etlken.m17n.org> <87r7kit0nz.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1106139592 13280 80.91.229.6 (19 Jan 2005 12:59:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2005 12:59:52 +0000 (UTC) Cc: agustin.martin@hispalinux.es, 130397@bugs.debian.org, k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 19 13:59:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CrFR1-0008PJ-00 for ; Wed, 19 Jan 2005 13:59:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrFcu-000600-Sv for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2005 08:12:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CrFXw-0003Nz-E1 for emacs-devel@gnu.org; Wed, 19 Jan 2005 08:06:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CrFXq-0003N9-Bg for emacs-devel@gnu.org; Wed, 19 Jan 2005 08:06:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrFXo-0003MW-Ba for emacs-devel@gnu.org; Wed, 19 Jan 2005 08:06:44 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CrFKM-0007Qz-VO for emacs-devel@gnu.org; Wed, 19 Jan 2005 07:52:51 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j0JCqBuV029519; Wed, 19 Jan 2005 21:52:11 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id j0JCq9i23022; Wed, 19 Jan 2005 21:52:09 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id VAA13392; Wed, 19 Jan 2005 21:52:09 +0900 (JST) Original-To: Juri Linkov In-reply-to: <87r7kit0nz.fsf@jurta.org> (message from Juri Linkov on Wed, 19 Jan 2005 09:43:16 +0200) 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) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32380 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32380 In article <87r7kit0nz.fsf@jurta.org>, Juri Linkov 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 handa@m17n.org 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.