jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

ispell.sl: broken for non-ascii letters and split words


Hi John,

* ispell.sl does not work with non‐ascii letters, e.g. german umlauts.
* ispell.sl splits the output of ispell on spaces, but it must split on
  commas. E.g. checking the german “word garnicht” should suggest “gar
  nicht”. The output of ispell is:
  % echo garnicht | ispell -a
  @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.4)
  & garnicht 12 0: gar nicht, gar-nicht, garniert, Warnlicht, Gericht,
  Granit, Gaslicht, gereicht, geharnischt, garni, garnierst, garnierte

#v+
Index: /home/joerg/svn/jed-upstream/lib/ispell.sl
===================================================================
--- /home/joerg/svn/jed-upstream/lib/ispell.sl	(Revision 54)
+++ /home/joerg/svn/jed-upstream/lib/ispell.sl	(Arbeitskopie)
@@ -18,10 +18,11 @@
    ibuf = " *ispell*";
    buf = whatbuf();
    
-   skip_chars(letters); bskip_chars(letters); push_mark(); % push_mark();
+   bskip_word_chars();
+   n = _get_point ();
+   push_mark();
+   skip_word_chars();
 
-   n = _get_point ();
-   skip_chars(letters);
    if (_get_point () == n)
      {
 	pop_mark_0 (); %pop_mark_0 ();
@@ -73,10 +74,9 @@
    
    insert ("(0) ");
    n = 1;
-   while (ffind_char (' '))
+   while (ffind_char (','))
      {
-	go_left_1 ();
-	if (looking_at_char(',')) del(); else go_right_1 ();
+	del();
 	trim(); newline();
 	vinsert ("(%d) ", n);
 	++n;
#v-

Bye, Jörg.
-- 
Das Recht, seine Meinung zu wechseln, ist eines der wichtigsten
menschlichen Privilegien.
	     		 			(Robert Peel)

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]