lkundrak / rpms / vim

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