073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.447
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.447
073263
Problem:    Spell files from Hunspell may generate a lot of errors.
073263
Solution:   Add the IGNOREEXTRA flag.
073263
Files:	    src/spell.c, runtime/doc/spell.txt
073263
073263
073263
*** ../vim-7.4.446/src/spell.c	2014-05-13 14:03:36.425611242 +0200
073263
--- src/spell.c	2014-09-19 15:24:19.582412580 +0200
073263
***************
073263
*** 4841,4846 ****
073263
--- 4841,4847 ----
073263
      unsigned	af_nosuggest;	/* NOSUGGEST ID */
073263
      int		af_pfxpostpone;	/* postpone prefixes without chop string and
073263
  				   without flags */
073263
+     int		af_ignoreextra;	/* IGNOREEXTRA present */
073263
      hashtab_T	af_pref;	/* hashtable for prefixes, affheader_T */
073263
      hashtab_T	af_suff;	/* hashtable for suffixes, affheader_T */
073263
      hashtab_T	af_comp;	/* hashtable for compound flags, compitem_T */
073263
***************
073263
*** 5605,5610 ****
073263
--- 5606,5615 ----
073263
  	    {
073263
  		aff->af_pfxpostpone = TRUE;
073263
  	    }
073263
+ 	    else if (is_aff_rule(items, itemcnt, "IGNOREEXTRA", 1))
073263
+ 	    {
073263
+ 		aff->af_ignoreextra = TRUE;
073263
+ 	    }
073263
  	    else if ((STRCMP(items[0], "PFX") == 0
073263
  					      || STRCMP(items[0], "SFX") == 0)
073263
  		    && aff_todo == 0
073263
***************
073263
*** 5712,5720 ****
073263
  		int		lasti = 5;
073263
  
073263
  		/* Myspell allows extra text after the item, but that might
073263
! 		 * mean mistakes go unnoticed.  Require a comment-starter.
073263
! 		 * Hunspell uses a "-" item. */
073263
! 		if (itemcnt > lasti && *items[lasti] != '#'
073263
  			&& (STRCMP(items[lasti], "-") != 0
073263
  						     || itemcnt != lasti + 1))
073263
  		    smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
073263
--- 5717,5727 ----
073263
  		int		lasti = 5;
073263
  
073263
  		/* Myspell allows extra text after the item, but that might
073263
! 		 * mean mistakes go unnoticed.  Require a comment-starter,
073263
! 		 * unless IGNOREEXTRA is used.  Hunspell uses a "-" item. */
073263
! 		if (itemcnt > lasti
073263
! 			&& !aff->af_ignoreextra
073263
! 			&& *items[lasti] != '#'
073263
  			&& (STRCMP(items[lasti], "-") != 0
073263
  						     || itemcnt != lasti + 1))
073263
  		    smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
073263
*** ../vim-7.4.446/runtime/doc/spell.txt	2013-11-12 04:43:57.000000000 +0100
073263
--- runtime/doc/spell.txt	2014-09-19 15:18:00.318411751 +0200
073263
***************
073263
*** 1057,1062 ****
073263
--- 1058,1066 ----
073263
  	SFX F 0 in   [^i]n      # Spion > Spionin  ~
073263
  	SFX F 0 nen  in		# Bauerin > Bauerinnen ~
073263
  
073263
+ However, to avoid lots of errors in affix files written for Myspell, you can
073263
+ add the IGNOREEXTRA flag.
073263
+ 
073263
  Apparently Myspell allows an affix name to appear more than once.  Since this
073263
  might also be a mistake, Vim checks for an extra "S".  The affix files for
073263
  Myspell that use this feature apparently have this flag.  Example:
073263
***************
073263
*** 1110,1115 ****
073263
--- 1114,1127 ----
073263
  - CIRCUMFIX, as explained just below.
073263
  
073263
  
073263
+ IGNOREEXTRA						*spell-IGNOREEXTRA*
073263
+ 
073263
+ Normally Vim gives an error for an extra field that does not start with '#'.
073263
+ This avoids errors going unnoticed.  However, some files created for Myspell
073263
+ or Hunspell may contain many entries with an extra field.  Use the IGNOREEXTRA
073263
+ flag to avoid lots of errors.
073263
+ 
073263
+ 
073263
  CIRCUMFIX						*spell-CIRCUMFIX*
073263
  
073263
  The CIRCUMFIX flag means a prefix and suffix must be added at the same time.
073263
*** ../vim-7.4.446/src/version.c	2014-09-19 14:26:29.658405000 +0200
073263
--- src/version.c	2014-09-19 15:18:41.774411842 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     447,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
161. You get up before the sun rises to check your e-mail, and you
073263
     find yourself in the very same chair long after the sun has set.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///