It's hard to believe that such a popular and old package as ispell.el
has a trivial and easily reproducible bug.  When the length of the
returned look-up words is greater than 256, then ispell.el fails with
the error "Invalid character: 0400, 256, 0x100".

Steps to reproduce: type a non-dictionary word, type `M-$' on it,
type `l' and a string containing wildcards like `ac*'.

The patch below avoids this error by restricting the number of
displayed words to 256.  But I wonder are characters between
127 and 256 are useful?  How users are supposed to type them?
The code in ispell.el takes into account the fact that codes
above 127 are displayed in octal notation which increases the
length of displayed text to 3 per character (see the condition
`(if (> count ?~) 3 0)').

Index: lisp/textmodes/ispell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.167
diff -c -r1.167 ispell.el
*** lisp/textmodes/ispell.el    28 Jun 2005 22:02:13 -0000      1.167
--- lisp/textmodes/ispell.el    3 Jul 2005 00:03:32 -0000
***************
*** 1818,1819 ****
                                    choices miss
                                    line ispell-choices-win-default-height)
                              (while (and choices ; adjust choices window.
+                                         (< count 256)
                                          (< (if (> (+ 7 (current-column)
                                                       (length (car choices))
                                                       (if (> count ?~) 3 0))

-- 
Juri Linkov
http://www.jurta.org/emacs/



_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to