dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.088
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.088
dcaee6
Problem:    When spell checking is enabled Asian characters are always marked
dcaee6
            as error.
dcaee6
Solution:   When 'spelllang' contains "cjk" do not mark Asian characters as
dcaee6
            error. (Ken Takata)
dcaee6
Files:      runtime/doc/options.txt, runtime/doc/spell.txt, src/mbyte.c,
dcaee6
            src/option.c, src/spell.c, src/structs.h
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.087/runtime/doc/options.txt	2013-11-06 05:26:08.000000000 +0100
dcaee6
--- runtime/doc/options.txt	2013-11-12 04:00:51.000000000 +0100
dcaee6
***************
dcaee6
*** 6555,6560 ****
dcaee6
--- 6555,6563 ----
dcaee6
  	region by listing them: "en_us,en_ca" supports both US and Canadian
dcaee6
  	English, but not words specific for Australia, New Zealand or Great
dcaee6
  	Britain.
dcaee6
+ 	If the name "cjk" is included East Asian characters are excluded from
dcaee6
+ 	spell checking.  This is useful when editing text that also has Asian
dcaee6
+ 	words.
dcaee6
  							*E757*
dcaee6
  	As a special case the name of a .spl file can be given as-is.  The
dcaee6
  	first "_xx" in the name is removed and used as the region name
dcaee6
*** ../vim-7.4.087/runtime/doc/spell.txt	2013-08-10 13:25:01.000000000 +0200
dcaee6
--- runtime/doc/spell.txt	2013-11-12 04:02:27.000000000 +0100
dcaee6
***************
dcaee6
*** 269,274 ****
dcaee6
--- 269,281 ----
dcaee6
  	latin1		yi		transliterated Yiddish
dcaee6
  	utf-8		yi-tr		transliterated Yiddish
dcaee6
  
dcaee6
+ 							*spell-cjk*
dcaee6
+ Chinese, Japanese and other East Asian characters are normally marked as
dcaee6
+ errors, because spell checking of these characters is not supported. If
dcaee6
+ 'spelllang' includes "cjk", these characters are not marked as errors.  This
dcaee6
+ is useful when editing text with spell checking while some Asian words are
dcaee6
+ present.
dcaee6
+ 
dcaee6
  
dcaee6
  SPELL FILES						*spell-load*
dcaee6
  
dcaee6
*** ../vim-7.4.087/src/mbyte.c	2013-07-05 20:07:21.000000000 +0200
dcaee6
--- src/mbyte.c	2013-11-12 03:55:50.000000000 +0100
dcaee6
***************
dcaee6
*** 947,954 ****
dcaee6
  		{
dcaee6
  		    case 0x2121: /* ZENKAKU space */
dcaee6
  			return 0;
dcaee6
! 		    case 0x2122: /* KU-TEN (Japanese comma) */
dcaee6
! 		    case 0x2123: /* TOU-TEN (Japanese period) */
dcaee6
  		    case 0x2124: /* ZENKAKU comma */
dcaee6
  		    case 0x2125: /* ZENKAKU period */
dcaee6
  			return 1;
dcaee6
--- 947,954 ----
dcaee6
  		{
dcaee6
  		    case 0x2121: /* ZENKAKU space */
dcaee6
  			return 0;
dcaee6
! 		    case 0x2122: /* TOU-TEN (Japanese comma) */
dcaee6
! 		    case 0x2123: /* KU-TEN (Japanese period) */
dcaee6
  		    case 0x2124: /* ZENKAKU comma */
dcaee6
  		    case 0x2125: /* ZENKAKU period */
dcaee6
  			return 1;
dcaee6
***************
dcaee6
*** 2477,2485 ****
dcaee6
      /* sorted list of non-overlapping intervals */
dcaee6
      static struct clinterval
dcaee6
      {
dcaee6
! 	unsigned short first;
dcaee6
! 	unsigned short last;
dcaee6
! 	unsigned short class;
dcaee6
      } classes[] =
dcaee6
      {
dcaee6
  	{0x037e, 0x037e, 1},		/* Greek question mark */
dcaee6
--- 2477,2485 ----
dcaee6
      /* sorted list of non-overlapping intervals */
dcaee6
      static struct clinterval
dcaee6
      {
dcaee6
! 	unsigned int first;
dcaee6
! 	unsigned int last;
dcaee6
! 	unsigned int class;
dcaee6
      } classes[] =
dcaee6
      {
dcaee6
  	{0x037e, 0x037e, 1},		/* Greek question mark */
dcaee6
***************
dcaee6
*** 2544,2549 ****
dcaee6
--- 2544,2553 ----
dcaee6
  	{0xff1a, 0xff20, 1},		/* half/fullwidth ASCII */
dcaee6
  	{0xff3b, 0xff40, 1},		/* half/fullwidth ASCII */
dcaee6
  	{0xff5b, 0xff65, 1},		/* half/fullwidth ASCII */
dcaee6
+ 	{0x20000, 0x2a6df, 0x4e00},	/* CJK Ideographs */
dcaee6
+ 	{0x2a700, 0x2b73f, 0x4e00},	/* CJK Ideographs */
dcaee6
+ 	{0x2b740, 0x2b81f, 0x4e00},	/* CJK Ideographs */
dcaee6
+ 	{0x2f800, 0x2fa1f, 0x4e00},	/* CJK Ideographs */
dcaee6
      };
dcaee6
      int bot = 0;
dcaee6
      int top = sizeof(classes) / sizeof(struct clinterval) - 1;
dcaee6
***************
dcaee6
*** 2563,2571 ****
dcaee6
      while (top >= bot)
dcaee6
      {
dcaee6
  	mid = (bot + top) / 2;
dcaee6
! 	if (classes[mid].last < c)
dcaee6
  	    bot = mid + 1;
dcaee6
! 	else if (classes[mid].first > c)
dcaee6
  	    top = mid - 1;
dcaee6
  	else
dcaee6
  	    return (int)classes[mid].class;
dcaee6
--- 2567,2575 ----
dcaee6
      while (top >= bot)
dcaee6
      {
dcaee6
  	mid = (bot + top) / 2;
dcaee6
! 	if (classes[mid].last < (unsigned int)c)
dcaee6
  	    bot = mid + 1;
dcaee6
! 	else if (classes[mid].first > (unsigned int)c)
dcaee6
  	    top = mid - 1;
dcaee6
  	else
dcaee6
  	    return (int)classes[mid].class;
dcaee6
*** ../vim-7.4.087/src/option.c	2013-11-08 04:30:06.000000000 +0100
dcaee6
--- src/option.c	2013-11-12 04:34:46.000000000 +0100
dcaee6
***************
dcaee6
*** 7122,7127 ****
dcaee6
--- 7122,7132 ----
dcaee6
  	if (varp == &(curwin->w_s->b_p_spl))
dcaee6
  	{
dcaee6
  	    char_u	fname[200];
dcaee6
+ 	    char_u	*q = curwin->w_s->b_p_spl;
dcaee6
+ 
dcaee6
+ 	    /* Skip the first name if it is "cjk". */
dcaee6
+ 	    if (STRNCMP(q, "cjk,", 4) == 0)
dcaee6
+ 		q += 4;
dcaee6
  
dcaee6
  	    /*
dcaee6
  	     * Source the spell/LANG.vim in 'runtimepath'.
dcaee6
***************
dcaee6
*** 7129,7139 ****
dcaee6
  	     * Use the first name in 'spelllang' up to '_region' or
dcaee6
  	     * '.encoding'.
dcaee6
  	     */
dcaee6
! 	    for (p = curwin->w_s->b_p_spl; *p != NUL; ++p)
dcaee6
  		if (vim_strchr((char_u *)"_.,", *p) != NULL)
dcaee6
  		    break;
dcaee6
! 	    vim_snprintf((char *)fname, 200, "spell/%.*s.vim",
dcaee6
! 				 (int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl);
dcaee6
  	    source_runtime(fname, TRUE);
dcaee6
  	}
dcaee6
  #endif
dcaee6
--- 7134,7143 ----
dcaee6
  	     * Use the first name in 'spelllang' up to '_region' or
dcaee6
  	     * '.encoding'.
dcaee6
  	     */
dcaee6
! 	    for (p = q; *p != NUL; ++p)
dcaee6
  		if (vim_strchr((char_u *)"_.,", *p) != NULL)
dcaee6
  		    break;
dcaee6
! 	    vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
dcaee6
  	    source_runtime(fname, TRUE);
dcaee6
  	}
dcaee6
  #endif
dcaee6
*** ../vim-7.4.087/src/spell.c	2013-09-29 13:38:25.000000000 +0200
dcaee6
--- src/spell.c	2013-11-12 04:37:33.000000000 +0100
dcaee6
***************
dcaee6
*** 754,762 ****
dcaee6
  static void clear_spell_chartab __ARGS((spelltab_T *sp));
dcaee6
  static int set_spell_finish __ARGS((spelltab_T	*new_st));
dcaee6
  static int spell_iswordp __ARGS((char_u *p, win_T *wp));
dcaee6
! static int spell_iswordp_nmw __ARGS((char_u *p));
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
! static int spell_mb_isword_class __ARGS((int cl));
dcaee6
  static int spell_iswordp_w __ARGS((int *p, win_T *wp));
dcaee6
  #endif
dcaee6
  static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
dcaee6
--- 754,762 ----
dcaee6
  static void clear_spell_chartab __ARGS((spelltab_T *sp));
dcaee6
  static int set_spell_finish __ARGS((spelltab_T	*new_st));
dcaee6
  static int spell_iswordp __ARGS((char_u *p, win_T *wp));
dcaee6
! static int spell_iswordp_nmw __ARGS((char_u *p, win_T *wp));
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
! static int spell_mb_isword_class __ARGS((int cl, win_T *wp));
dcaee6
  static int spell_iswordp_w __ARGS((int *p, win_T *wp));
dcaee6
  #endif
dcaee6
  static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
dcaee6
***************
dcaee6
*** 1149,1155 ****
dcaee6
  
dcaee6
  	/* When we are at a non-word character there is no error, just
dcaee6
  	 * skip over the character (try looking for a word after it). */
dcaee6
! 	else if (!spell_iswordp_nmw(ptr))
dcaee6
  	{
dcaee6
  	    if (capcol != NULL && wp->w_s->b_cap_prog != NULL)
dcaee6
  	    {
dcaee6
--- 1149,1155 ----
dcaee6
  
dcaee6
  	/* When we are at a non-word character there is no error, just
dcaee6
  	 * skip over the character (try looking for a word after it). */
dcaee6
! 	else if (!spell_iswordp_nmw(ptr, wp))
dcaee6
  	{
dcaee6
  	    if (capcol != NULL && wp->w_s->b_cap_prog != NULL)
dcaee6
  	    {
dcaee6
***************
dcaee6
*** 1561,1567 ****
dcaee6
  			 * accept a no-caps word, even when the dictionary
dcaee6
  			 * word specifies ONECAP. */
dcaee6
  			mb_ptr_back(mip->mi_word, p);
dcaee6
! 			if (spell_iswordp_nmw(p)
dcaee6
  				? capflags == WF_ONECAP
dcaee6
  				: (flags & WF_ONECAP) != 0
dcaee6
  						     && capflags != WF_ONECAP)
dcaee6
--- 1561,1567 ----
dcaee6
  			 * accept a no-caps word, even when the dictionary
dcaee6
  			 * word specifies ONECAP. */
dcaee6
  			mb_ptr_back(mip->mi_word, p);
dcaee6
! 			if (spell_iswordp_nmw(p, mip->mi_win)
dcaee6
  				? capflags == WF_ONECAP
dcaee6
  				: (flags & WF_ONECAP) != 0
dcaee6
  						     && capflags != WF_ONECAP)
dcaee6
***************
dcaee6
*** 4234,4240 ****
dcaee6
      if (spl_copy == NULL)
dcaee6
  	goto theend;
dcaee6
  
dcaee6
!     /* loop over comma separated language names. */
dcaee6
      for (splp = spl_copy; *splp != NUL; )
dcaee6
      {
dcaee6
  	/* Get one language name. */
dcaee6
--- 4234,4242 ----
dcaee6
      if (spl_copy == NULL)
dcaee6
  	goto theend;
dcaee6
  
dcaee6
!     wp->w_s->b_cjk = 0;
dcaee6
! 
dcaee6
!     /* Loop over comma separated language names. */
dcaee6
      for (splp = spl_copy; *splp != NUL; )
dcaee6
      {
dcaee6
  	/* Get one language name. */
dcaee6
***************
dcaee6
*** 4242,4247 ****
dcaee6
--- 4244,4255 ----
dcaee6
  	region = NULL;
dcaee6
  	len = (int)STRLEN(lang);
dcaee6
  
dcaee6
+ 	if (STRCMP(lang, "cjk") == 0)
dcaee6
+ 	{
dcaee6
+ 	    wp->w_s->b_cjk = 1;
dcaee6
+ 	    continue;
dcaee6
+ 	}
dcaee6
+ 
dcaee6
  	/* If the name ends in ".spl" use it as the name of the spell file.
dcaee6
  	 * If there is a region name let "region" point to it and remove it
dcaee6
  	 * from the name. */
dcaee6
***************
dcaee6
*** 4601,4607 ****
dcaee6
      int		past_second = FALSE;	/* past second word char */
dcaee6
  
dcaee6
      /* find first letter */
dcaee6
!     for (p = word; !spell_iswordp_nmw(p); mb_ptr_adv(p))
dcaee6
  	if (end == NULL ? *p == NUL : p >= end)
dcaee6
  	    return 0;	    /* only non-word characters, illegal word */
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
--- 4609,4615 ----
dcaee6
      int		past_second = FALSE;	/* past second word char */
dcaee6
  
dcaee6
      /* find first letter */
dcaee6
!     for (p = word; !spell_iswordp_nmw(p, curwin); mb_ptr_adv(p))
dcaee6
  	if (end == NULL ? *p == NUL : p >= end)
dcaee6
  	    return 0;	    /* only non-word characters, illegal word */
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
***************
dcaee6
*** 4617,4623 ****
dcaee6
       * But a word with an upper char only at start is a ONECAP.
dcaee6
       */
dcaee6
      for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p))
dcaee6
! 	if (spell_iswordp_nmw(p))
dcaee6
  	{
dcaee6
  	    c = PTR2CHAR(p);
dcaee6
  	    if (!SPELL_ISUPPER(c))
dcaee6
--- 4625,4631 ----
dcaee6
       * But a word with an upper char only at start is a ONECAP.
dcaee6
       */
dcaee6
      for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p))
dcaee6
! 	if (spell_iswordp_nmw(p, curwin))
dcaee6
  	{
dcaee6
  	    c = PTR2CHAR(p);
dcaee6
  	    if (!SPELL_ISUPPER(c))
dcaee6
***************
dcaee6
*** 9907,9913 ****
dcaee6
  
dcaee6
  	c = mb_ptr2char(s);
dcaee6
  	if (c > 255)
dcaee6
! 	    return spell_mb_isword_class(mb_get_class(s));
dcaee6
  	return spelltab.st_isw[c];
dcaee6
      }
dcaee6
  #endif
dcaee6
--- 9915,9921 ----
dcaee6
  
dcaee6
  	c = mb_ptr2char(s);
dcaee6
  	if (c > 255)
dcaee6
! 	    return spell_mb_isword_class(mb_get_class(s), wp);
dcaee6
  	return spelltab.st_isw[c];
dcaee6
      }
dcaee6
  #endif
dcaee6
***************
dcaee6
*** 9920,9927 ****
dcaee6
   * Unlike spell_iswordp() this doesn't check for "midword" characters.
dcaee6
   */
dcaee6
      static int
dcaee6
! spell_iswordp_nmw(p)
dcaee6
      char_u	*p;
dcaee6
  {
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
      int		c;
dcaee6
--- 9928,9936 ----
dcaee6
   * Unlike spell_iswordp() this doesn't check for "midword" characters.
dcaee6
   */
dcaee6
      static int
dcaee6
! spell_iswordp_nmw(p, wp)
dcaee6
      char_u	*p;
dcaee6
+     win_T	*wp;
dcaee6
  {
dcaee6
  #ifdef FEAT_MBYTE
dcaee6
      int		c;
dcaee6
***************
dcaee6
*** 9930,9936 ****
dcaee6
      {
dcaee6
  	c = mb_ptr2char(p);
dcaee6
  	if (c > 255)
dcaee6
! 	    return spell_mb_isword_class(mb_get_class(p));
dcaee6
  	return spelltab.st_isw[c];
dcaee6
      }
dcaee6
  #endif
dcaee6
--- 9939,9945 ----
dcaee6
      {
dcaee6
  	c = mb_ptr2char(p);
dcaee6
  	if (c > 255)
dcaee6
! 	    return spell_mb_isword_class(mb_get_class(p), wp);
dcaee6
  	return spelltab.st_isw[c];
dcaee6
      }
dcaee6
  #endif
dcaee6
***************
dcaee6
*** 9942,9952 ****
dcaee6
   * Return TRUE if word class indicates a word character.
dcaee6
   * Only for characters above 255.
dcaee6
   * Unicode subscript and superscript are not considered word characters.
dcaee6
   */
dcaee6
      static int
dcaee6
! spell_mb_isword_class(cl)
dcaee6
!     int cl;
dcaee6
  {
dcaee6
      return cl >= 2 && cl != 0x2070 && cl != 0x2080;
dcaee6
  }
dcaee6
  
dcaee6
--- 9951,9966 ----
dcaee6
   * Return TRUE if word class indicates a word character.
dcaee6
   * Only for characters above 255.
dcaee6
   * Unicode subscript and superscript are not considered word characters.
dcaee6
+  * See also dbcs_class() and utf_class() in mbyte.c.
dcaee6
   */
dcaee6
      static int
dcaee6
! spell_mb_isword_class(cl, wp)
dcaee6
!     int		cl;
dcaee6
!     win_T	*wp;
dcaee6
  {
dcaee6
+     if (wp->w_s->b_cjk)
dcaee6
+ 	/* East Asian characters are not considered word characters. */
dcaee6
+ 	return cl == 2 || cl == 0x2800;
dcaee6
      return cl >= 2 && cl != 0x2070 && cl != 0x2080;
dcaee6
  }
dcaee6
  
dcaee6
***************
dcaee6
*** 9971,9979 ****
dcaee6
      if (*s > 255)
dcaee6
      {
dcaee6
  	if (enc_utf8)
dcaee6
! 	    return spell_mb_isword_class(utf_class(*s));
dcaee6
  	if (enc_dbcs)
dcaee6
! 	    return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
dcaee6
  	return 0;
dcaee6
      }
dcaee6
      return spelltab.st_isw[*s];
dcaee6
--- 9985,9994 ----
dcaee6
      if (*s > 255)
dcaee6
      {
dcaee6
  	if (enc_utf8)
dcaee6
! 	    return spell_mb_isword_class(utf_class(*s), wp);
dcaee6
  	if (enc_dbcs)
dcaee6
! 	    return spell_mb_isword_class(
dcaee6
! 				dbcs_class((unsigned)*s >> 8, *s & 0xff), wp);
dcaee6
  	return 0;
dcaee6
      }
dcaee6
      return spelltab.st_isw[*s];
dcaee6
***************
dcaee6
*** 10193,10205 ****
dcaee6
  	line = ml_get_curline();
dcaee6
  	p = line + curwin->w_cursor.col;
dcaee6
  	/* Backup to before start of word. */
dcaee6
! 	while (p > line && spell_iswordp_nmw(p))
dcaee6
  	    mb_ptr_back(line, p);
dcaee6
  	/* Forward to start of word. */
dcaee6
! 	while (*p != NUL && !spell_iswordp_nmw(p))
dcaee6
  	    mb_ptr_adv(p);
dcaee6
  
dcaee6
! 	if (!spell_iswordp_nmw(p))		/* No word found. */
dcaee6
  	{
dcaee6
  	    beep_flush();
dcaee6
  	    return;
dcaee6
--- 10208,10220 ----
dcaee6
  	line = ml_get_curline();
dcaee6
  	p = line + curwin->w_cursor.col;
dcaee6
  	/* Backup to before start of word. */
dcaee6
! 	while (p > line && spell_iswordp_nmw(p, curwin))
dcaee6
  	    mb_ptr_back(line, p);
dcaee6
  	/* Forward to start of word. */
dcaee6
! 	while (*p != NUL && !spell_iswordp_nmw(p, curwin))
dcaee6
  	    mb_ptr_adv(p);
dcaee6
  
dcaee6
! 	if (!spell_iswordp_nmw(p, curwin))		/* No word found. */
dcaee6
  	{
dcaee6
  	    beep_flush();
dcaee6
  	    return;
dcaee6
***************
dcaee6
*** 10436,10442 ****
dcaee6
  	for (;;)
dcaee6
  	{
dcaee6
  	    mb_ptr_back(line, p);
dcaee6
! 	    if (p == line || spell_iswordp_nmw(p))
dcaee6
  		break;
dcaee6
  	    if (vim_regexec(&regmatch, p, 0)
dcaee6
  					 && regmatch.endp[0] == line + endcol)
dcaee6
--- 10451,10457 ----
dcaee6
  	for (;;)
dcaee6
  	{
dcaee6
  	    mb_ptr_back(line, p);
dcaee6
! 	    if (p == line || spell_iswordp_nmw(p, curwin))
dcaee6
  		break;
dcaee6
  	    if (vim_regexec(&regmatch, p, 0)
dcaee6
  					 && regmatch.endp[0] == line + endcol)
dcaee6
***************
dcaee6
*** 11645,11651 ****
dcaee6
  
dcaee6
  		/* When appending a compound word after a word character don't
dcaee6
  		 * use Onecap. */
dcaee6
! 		if (p != NULL && spell_iswordp_nmw(p))
dcaee6
  		    c &= ~WF_ONECAP;
dcaee6
  		make_case_word(tword + sp->ts_splitoff,
dcaee6
  					      preword + sp->ts_prewordlen, c);
dcaee6
--- 11660,11666 ----
dcaee6
  
dcaee6
  		/* When appending a compound word after a word character don't
dcaee6
  		 * use Onecap. */
dcaee6
! 		if (p != NULL && spell_iswordp_nmw(p, curwin))
dcaee6
  		    c &= ~WF_ONECAP;
dcaee6
  		make_case_word(tword + sp->ts_splitoff,
dcaee6
  					      preword + sp->ts_prewordlen, c);
dcaee6
***************
dcaee6
*** 11895,11901 ****
dcaee6
  			 * character when the word ends.  But only when the
dcaee6
  			 * good word can end. */
dcaee6
  			if (((!try_compound && !spell_iswordp_nmw(fword
dcaee6
! 							       + sp->ts_fidx))
dcaee6
  				    || fword_ends)
dcaee6
  				&& fword[sp->ts_fidx] != NUL
dcaee6
  				&& goodword_ends)
dcaee6
--- 11910,11917 ----
dcaee6
  			 * character when the word ends.  But only when the
dcaee6
  			 * good word can end. */
dcaee6
  			if (((!try_compound && !spell_iswordp_nmw(fword
dcaee6
! 							       + sp->ts_fidx,
dcaee6
! 							       curwin))
dcaee6
  				    || fword_ends)
dcaee6
  				&& fword[sp->ts_fidx] != NUL
dcaee6
  				&& goodword_ends)
dcaee6
***************
dcaee6
*** 14226,14232 ****
dcaee6
  	    }
dcaee6
  	    else
dcaee6
  	    {
dcaee6
! 		if (spell_iswordp_nmw(s))
dcaee6
  		    *t++ = *s;
dcaee6
  		++s;
dcaee6
  	    }
dcaee6
--- 14242,14248 ----
dcaee6
  	    }
dcaee6
  	    else
dcaee6
  	    {
dcaee6
! 		if (spell_iswordp_nmw(s, curwin))
dcaee6
  		    *t++ = *s;
dcaee6
  		++s;
dcaee6
  	    }
dcaee6
***************
dcaee6
*** 14521,14527 ****
dcaee6
  	    else
dcaee6
  	    {
dcaee6
  		did_white = FALSE;
dcaee6
! 		if (!spell_iswordp_nmw(t))
dcaee6
  		    continue;
dcaee6
  	    }
dcaee6
  	}
dcaee6
--- 14537,14543 ----
dcaee6
  	    else
dcaee6
  	    {
dcaee6
  		did_white = FALSE;
dcaee6
! 		if (!spell_iswordp_nmw(t, curwin))
dcaee6
  		    continue;
dcaee6
  	    }
dcaee6
  	}
dcaee6
***************
dcaee6
*** 16045,16051 ****
dcaee6
      for (p = line + startcol; p > line; )
dcaee6
      {
dcaee6
  	mb_ptr_back(line, p);
dcaee6
! 	if (spell_iswordp_nmw(p))
dcaee6
  	    break;
dcaee6
      }
dcaee6
  
dcaee6
--- 16061,16067 ----
dcaee6
      for (p = line + startcol; p > line; )
dcaee6
      {
dcaee6
  	mb_ptr_back(line, p);
dcaee6
! 	if (spell_iswordp_nmw(p, curwin))
dcaee6
  	    break;
dcaee6
      }
dcaee6
  
dcaee6
*** ../vim-7.4.087/src/structs.h	2013-11-09 05:30:18.000000000 +0100
dcaee6
--- src/structs.h	2013-11-12 03:55:50.000000000 +0100
dcaee6
***************
dcaee6
*** 1310,1315 ****
dcaee6
--- 1310,1318 ----
dcaee6
      regprog_T	*b_cap_prog;	/* program for 'spellcapcheck' */
dcaee6
      char_u	*b_p_spf;	/* 'spellfile' */
dcaee6
      char_u	*b_p_spl;	/* 'spelllang' */
dcaee6
+ # ifdef FEAT_MBYTE
dcaee6
+     int		b_cjk;		/* all CJK letters as OK */
dcaee6
+ # endif
dcaee6
  #endif
dcaee6
  #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
dcaee6
      int		dummy;
dcaee6
*** ../vim-7.4.087/src/version.c	2013-11-11 23:17:31.000000000 +0100
dcaee6
--- src/version.c	2013-11-12 03:59:03.000000000 +0100
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     88,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
THEOREM: VI is perfect.
dcaee6
PROOF: VI in roman numerals is 6.  The natural numbers < 6 which divide 6 are
dcaee6
1, 2, and 3. 1+2+3 = 6.  So 6 is a perfect number.  Therefore, VI is perfect.
dcaee6
QED
dcaee6
						    -- Arthur Tateishi
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///