[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 08:24:31 +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:
> Kenichi Handa <address@hidden> writes:
>> Please try the latest ispell.el. I think at least this
>> misalignment error is fixed now.
> I tried the latest ispell.el and I see that your change is a definite
> improvement since it now allows to check words in mule-unicode charsets.
> But it still doesn't fix the misalignment error. It even makes this
> error more frequent because it now occurs in all UTF-8 texts checked
> with ispell-region (which earlier were simply skipped before your change).
> The cause of the error is the following: a line sent by ispell.el
> to the ispell process is converted from mule-unicode charset to the
> process charset, and the accepted output gets converted from process
> coding to the internal Emacs charset iso8859. So `search-forward' in
> `ispell-process-line' fails to find a string in iso8859 charset
> in the buffer with the same string in mule-unicode charset.
Ah! I see. I've just installed the attached change which
should fix that misalignment error. ispell-looking-at is
not that tuned yet, and there will be a better way to
implemente it.
---
Ken'ichi HANDA
address@hidden
Index: ispell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -c -r1.152 -r1.153
cvs diff: conflicting specifications of output style
*** ispell.el 13 Jan 2005 04:33:05 -0000 1.152
--- ispell.el 18 Jan 2005 23:16:27 -0000 1.153
***************
*** 2794,2799 ****
--- 2794,2808 ----
string))
+ (defun ispell-looking-at (string)
+ (let ((coding (ispell-get-coding-system))
+ (len (length string)))
+ (and (<= (+ (point) len) (point-max))
+ (equal (encode-coding-string string coding)
+ (encode-coding-string (buffer-substring-no-properties
+ (point) (+ (point) len))
+ coding)))))
+
;;; Avoid error messages when compiling for these dynamic variables.
(eval-when-compile
(defvar start)
***************
*** 2842,2853 ****
;; Alignment cannot be tracked and this error will occur when
;; `query-replace' makes multiple corrections on the starting line.
! (if (/= (+ word-len (point))
! (progn
! ;; NB: Search can fail with Mule coding systems that don't
! ;; display properly. Ignore the error in this case?
! (search-forward (car poss) (+ word-len (point)) t)
! (point)))
;; This occurs due to filter pipe problems
(error (concat "Ispell misalignment: word "
"`%s' point %d; probably incompatible versions")
--- 2851,2857 ----
;; Alignment cannot be tracked and this error will occur when
;; `query-replace' makes multiple corrections on the starting line.
! (or (ispell-looking-at (car poss))
;; This occurs due to filter pipe problems
(error (concat "Ispell misalignment: word "
"`%s' point %d; probably incompatible versions")
- Re: Bug 130397, (continued)
- Re: Bug 130397, Eli Zaretskii, 2005/01/10
- Re: Bug 130397, Kenichi Handa, 2005/01/13
- 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 <=
- Re: Bug 130397, Juri Linkov, 2005/01/19
- Re: Bug 130397, Kenichi Handa, 2005/01/19
- 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