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