]> granicus.if.org Git - vim/commitdiff
updated for version 7.0152
authorBram Moolenaar <Bram@vim.org>
Fri, 30 Sep 2005 21:12:02 +0000 (21:12 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 30 Sep 2005 21:12:02 +0000 (21:12 +0000)
runtime/spell/fo/fo_FO.diff
runtime/spell/gl/gl_ES.diff
src/spell.c

index 12d04209e8f97a8d71dceaed6ecb998cb9e6b20d..a224d2b325df7f2fd75b85f4f756947244487810 100644 (file)
 *** fo_FO.orig.aff     Wed Aug 31 22:02:11 2005
---- fo_FO.aff  Wed Aug 31 22:02:11 2005
+--- fo_FO.aff  Fri Sep 30 12:55:30 2005
 ***************
 *** 6 ****
---- 6,14 ----
+--- 6,142 ----
   
 + FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
 + LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
 + UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
 + 
-+ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
-+ SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
-+ 
 + MIDWORD      '-
++ 
++ # sound folding from Aspell, version 0.1-2001.04.30-5
++ # 2001.04.30: Jacob Sparre Andersen
++ # no copyright notice
++ 
++ # fra for eksempel aftage, det udtages avtage
++ SAL AA<                  Å
++ SAL AFT^                 AT
++ #AF<                  AV
++ SAL AH$<                 A
++ SAL A                    A
++ 
++ SAL Á                    Á
++ 
++ SAL B                    B
++ 
++ # C udtales nogengange som K, andre gange som S og i få tilfælde som SJ
++ # CK bruges ofte til at ændre lyden på det foregående (f.eks ren A lyd)
++ #
++ SAL CC<                  KK
++ SAL CK<                  K  
++ SAL CHR^<                KR
++ SAL CH<                  SJ
++ SAL CI<                  SI
++ SAL CO<                  KO
++ SAL CY<                  SY
++ SAL C                    C
++ 
++ # D udtales ofte blødt/stumt - regler?
++ #
++ # Stumt G
++ 
++ #DIG^$                DAJ
++ #DIG<                 DI
++ SAL D                    D
++ 
++ SAL ÐUR<                 VUR
++ SAL Ð                    _
++ 
++ SAL EAUX<                O
++ SAL EAU<                 O
++ #EJ$<                 AJ
++ SAL EUS<                 ØVS
++ SAL E                    E
++ 
++ SAL É<                   E
++ 
++ SAL È<                   E
++ 
++ SAL F                    F
++ 
++ SAL G                    G
++ 
++ SAL HJ^<                 J
++ SAL HÅRD<                HÅR
++ SAL HÅND<                HÅN
++ SAL H                    H
++ 
++ SAL IÐ^$                 Í
++ SAL IÐ$<                 I
++ SAL IND^<                IN
++ SAL I                    I
++ 
++ SAL Í                    Í
++ 
++ SAL J                    J
++ 
++ SAL KE^                  TJE
++ SAL K                    K
++ 
++ # Stumt G
++ SAL LIG<                 LI
++ SAL L                    L
++ 
++ SAL M                    M
++ 
++ SAL N                    N
++ 
++ SAL OCH<                 OK
++ SAL O                    O
++ 
++ SAL Ó                    Ó
++ 
++ SAL PH<                  F
++ SAL P                    P
++ 
++ SAL Q<                   KU
++ 
++ #REGN<                REJN
++ SAL R                    R
++ 
++ SAL SH<                  SJ
++ SAL SIÓN                 SJÓN
++ SAL S'S<$                S
++ SAL S                    S
++ 
++ SAL TH$<                 T
++ SAL TIÓN                 SJÓN
++ SAL T                    T
++ 
++ SAL U                    U
++ 
++ SAL Ú                    Ú
++ 
++ SAL Ü<                   Y
++ 
++ SAL V                    V
++ 
++ SAL W<                   V
++ 
++ SAL X'S$<                KS
++ SAL X<                   KS
++ 
++ SAL Y<                   I
++ 
++ SAL Ý<                   Í
++ 
++ SAL Z'S$<                S
++ SAL Z$<                  S
++ SAL Z                    Z
++ 
++ SAL Æ<                   A
++ 
++ SAL Ä<                   Æ
++ 
++ SAL ØRN                  ØDN
++ SAL Ø                    Ø
++ 
++ SAL Ö<                   Ø
++ 
++ SAL Å<                   Á
index 6b0b2a1477d6be90dc724cb304d51461af0e81c6..be5693750402b2632beb7a8b5ba531292183af70 100644 (file)
@@ -1,15 +1,72 @@
 *** gl_ES.orig.aff     Tue Aug 16 17:59:15 2005
---- gl_ES.aff  Tue Aug 16 17:59:15 2005
+--- gl_ES.aff  Fri Sep 30 13:06:45 2005
 ***************
 *** 2,3 ****
---- 2,11 ----
+--- 2,8 ----
   TRY áéíóúesianrtolcdugmphbfvñ
 + 
 + FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
 + LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
 + UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
-+ 
-+ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
-+ SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
 + 
   # COMPOUNDMIN 3
+***************
+*** 1172 ****
+--- 1177,1233 ----
+  SFX C   ionar ción         cionar
++ 
++ # soundslike mapping from Aspell
++ #   Copyright (C) 2000 Ramón Flores, distributed under GNU GPL
++ #    Ramón Flores may be reached by email at fa2ramon@usc.es
++ # version galega 0.1
++ 
++ SAL followup        0
++ SAL collapse_result 0
++ 
++ SAL Á                  A
++ SAL A                  A
++ SAL BEL$                BLE
++ SAL BL                  L
++ SAL BM                 M
++ SAL BS                  S
++ SAL BT                 T
++ SAL B                   B
++ SAL C(EI)               S
++ SAL C                   K
++ SAL D                   D
++ SAL É                   E
++ SAL EI                  EC
++ SAL EI                 EP
++ SAL E                   E
++ SAL F                   F
++ SAL G                   G
++ SAL H                  _
++ SAL Í                  I
++ SAL IT                 ICT
++ SAL I                   I
++ SAL J                  X
++ SAL K                  K
++ SAL L                  L
++ SAL M                  M
++ SAL N                  MN
++ SAL N                  NN
++ SAL N                   N
++ SAL Ó                  O
++ SAL ÓN$                IÓN
++ SAL O                  O
++ SAL PS                 S
++ SAL QU                 K
++ SAL R                   R
++ SAL S                  S
++ SAL T                  T
++ SAL Ú                  U
++ SAL UT                 UCT
++ SAL U                  U
++ SAL V                  B
++ SAL X                  S
++ SAL X                  G
++ SAL X                  J
++ SAL Y                  I
++ SAL ZA$                CIA
++ SAL ZO$                CIO
++ SAL Z                  S
index 6076dfc86ca94cd812d7cf442ec2a9e2e4c66e80..be5dc951d907f9b7750af2e5009c463af8ab3078 100644 (file)
@@ -11197,12 +11197,12 @@ add_suggestion(su, gap, goodword, badlenarg, score, altscore, had_bonus, slang)
         * "thes" -> "these". */
        stp = &SUG(*gap, 0);
        for (i = gap->ga_len - 1; i >= 0; --i)
-           if (STRLEN(stp[i].st_word) == goodlen
+           if ((int)STRLEN(stp[i].st_word) == goodlen
                        && STRNCMP(stp[i].st_word, goodword, goodlen) == 0
                                                && stp[i].st_orglen == badlen)
            {
                /*
-                * Found it.  Remember the lowest score.
+                * Found it.  Remember the word with the lowest score.
                 */
                if (stp[i].st_slang == NULL)
                    stp[i].st_slang = slang;
@@ -11217,7 +11217,8 @@ add_suggestion(su, gap, goodword, badlenarg, score, altscore, had_bonus, slang)
                     * Need to do that for the other one now, otherwise the
                     * scores can't be compared.  This happens because
                     * suggest_try_change() doesn't compute the soundalike
-                    * word to keep it fast. */
+                    * word to keep it fast, while some special methods set
+                    * the soundalike score to zero. */
                    if (had_bonus)
                        rescore_one(su, &stp[i]);
                    else
@@ -11340,24 +11341,26 @@ rescore_suggestions(su)
  */
     static void
 rescore_one(su, stp)
-    suginfo_T *su;
-    suggest_T *stp;
+    suginfo_T  *su;
+    suggest_T  *stp;
 {
     slang_T    *slang = stp->st_slang;
     char_u     sal_badword[MAXWLEN];
+    char_u     *p;
 
     /* Only rescore suggestions that have no sal score yet and do have a
      * language. */
     if (slang != NULL && slang->sl_sal.ga_len > 0 && !stp->st_had_bonus)
     {
        if (slang == su->su_sallang)
-           stp->st_altscore = stp_sal_score(stp, su,
-                                                  slang, su->su_sal_badword);
+           p = su->su_sal_badword;
        else
        {
            spell_soundfold(slang, su->su_fbadword, TRUE, sal_badword);
-           stp->st_altscore = stp_sal_score(stp, su, slang, sal_badword);
+           p = sal_badword;
        }
+
+       stp->st_altscore = stp_sal_score(stp, su, slang, p);
        if (stp->st_altscore == SCORE_MAXMAX)
            stp->st_altscore = SCORE_BIG;
        stp->st_score = RESCORE(stp->st_score, stp->st_altscore);
@@ -12836,8 +12839,6 @@ spell_to_word_end(start, buf)
 }
 
 #if defined(FEAT_INS_EXPAND) || defined(PROTO)
-static int spell_expand_need_cap;
-
 /*
  * Find start of the word in front of the cursor.  We don't check if it is
  * badly spelled, with completion we can only change the word in front of the
@@ -12875,13 +12876,22 @@ spell_word_start(startcol)
        col = 0;
     }
 
-    /* Need to check for 'spellcapcheck' now, the word is removed before
-     * expand_spelling() is called.  Therefore the ugly global variable. */
-    spell_expand_need_cap = check_need_cap(curwin->w_cursor.lnum, col);
-
     return col;
 }
 
+/*
+ * Need to check for 'spellcapcheck' now, the word is removed before
+ * expand_spelling() is called.  Therefore the ugly global variable.
+ */
+static int spell_expand_need_cap;
+
+    void
+spell_expand_check_cap(col)
+    colnr_T col;
+{
+    spell_expand_need_cap = check_need_cap(curwin->w_cursor.lnum, col);
+}
+
 /*
  * Get list of spelling suggestions.
  * Used for Insert mode completion CTRL-X ?.