home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.447 < prev    next >
Encoding:
Internet Message Format  |  2014-09-19  |  4.0 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.447
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.447
  11. Problem:    Spell files from Hunspell may generate a lot of errors.
  12. Solution:   Add the IGNOREEXTRA flag.
  13. Files:        src/spell.c, runtime/doc/spell.txt
  14.  
  15.  
  16. *** ../vim-7.4.446/src/spell.c    2014-05-13 14:03:36.425611242 +0200
  17. --- src/spell.c    2014-09-19 15:24:19.582412580 +0200
  18. ***************
  19. *** 4841,4846 ****
  20. --- 4841,4847 ----
  21.       unsigned    af_nosuggest;    /* NOSUGGEST ID */
  22.       int        af_pfxpostpone;    /* postpone prefixes without chop string and
  23.                      without flags */
  24. +     int        af_ignoreextra;    /* IGNOREEXTRA present */
  25.       hashtab_T    af_pref;    /* hashtable for prefixes, affheader_T */
  26.       hashtab_T    af_suff;    /* hashtable for suffixes, affheader_T */
  27.       hashtab_T    af_comp;    /* hashtable for compound flags, compitem_T */
  28. ***************
  29. *** 5605,5610 ****
  30. --- 5606,5615 ----
  31.           {
  32.           aff->af_pfxpostpone = TRUE;
  33.           }
  34. +         else if (is_aff_rule(items, itemcnt, "IGNOREEXTRA", 1))
  35. +         {
  36. +         aff->af_ignoreextra = TRUE;
  37. +         }
  38.           else if ((STRCMP(items[0], "PFX") == 0
  39.                             || STRCMP(items[0], "SFX") == 0)
  40.               && aff_todo == 0
  41. ***************
  42. *** 5712,5720 ****
  43.           int        lasti = 5;
  44.   
  45.           /* Myspell allows extra text after the item, but that might
  46. !          * mean mistakes go unnoticed.  Require a comment-starter.
  47. !          * Hunspell uses a "-" item. */
  48. !         if (itemcnt > lasti && *items[lasti] != '#'
  49.               && (STRCMP(items[lasti], "-") != 0
  50.                                || itemcnt != lasti + 1))
  51.               smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
  52. --- 5717,5727 ----
  53.           int        lasti = 5;
  54.   
  55.           /* Myspell allows extra text after the item, but that might
  56. !          * mean mistakes go unnoticed.  Require a comment-starter,
  57. !          * unless IGNOREEXTRA is used.  Hunspell uses a "-" item. */
  58. !         if (itemcnt > lasti
  59. !             && !aff->af_ignoreextra
  60. !             && *items[lasti] != '#'
  61.               && (STRCMP(items[lasti], "-") != 0
  62.                                || itemcnt != lasti + 1))
  63.               smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
  64. *** ../vim-7.4.446/runtime/doc/spell.txt    2013-11-12 04:43:57.000000000 +0100
  65. --- runtime/doc/spell.txt    2014-09-19 15:18:00.318411751 +0200
  66. ***************
  67. *** 1057,1062 ****
  68. --- 1058,1066 ----
  69.       SFX F 0 in   [^i]n      # Spion > Spionin  ~
  70.       SFX F 0 nen  in        # Bauerin > Bauerinnen ~
  71.   
  72. + However, to avoid lots of errors in affix files written for Myspell, you can
  73. + add the IGNOREEXTRA flag.
  74.   Apparently Myspell allows an affix name to appear more than once.  Since this
  75.   might also be a mistake, Vim checks for an extra "S".  The affix files for
  76.   Myspell that use this feature apparently have this flag.  Example:
  77. ***************
  78. *** 1110,1115 ****
  79. --- 1114,1127 ----
  80.   - CIRCUMFIX, as explained just below.
  81.   
  82.   
  83. + IGNOREEXTRA                        *spell-IGNOREEXTRA*
  84. + Normally Vim gives an error for an extra field that does not start with '#'.
  85. + This avoids errors going unnoticed.  However, some files created for Myspell
  86. + or Hunspell may contain many entries with an extra field.  Use the IGNOREEXTRA
  87. + flag to avoid lots of errors.
  88.   CIRCUMFIX                        *spell-CIRCUMFIX*
  89.   
  90.   The CIRCUMFIX flag means a prefix and suffix must be added at the same time.
  91. *** ../vim-7.4.446/src/version.c    2014-09-19 14:26:29.658405000 +0200
  92. --- src/version.c    2014-09-19 15:18:41.774411842 +0200
  93. ***************
  94. *** 743,744 ****
  95. --- 743,746 ----
  96.   {   /* Add new patch number below this line */
  97. + /**/
  98. +     447,
  99.   /**/
  100.  
  101. -- 
  102. hundred-and-one symptoms of being an internet addict:
  103. 161. You get up before the sun rises to check your e-mail, and you
  104.      find yourself in the very same chair long after the sun has set.
  105.  
  106.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  107. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  108. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  109.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  110.