updated for version 7.0079
diff --git a/src/charset.c b/src/charset.c
index 25680f6..33c12f2 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1840,6 +1840,20 @@
     return p;
 }
 
+#if defined(FEAT_SYN_HL) || defined(PROTO)
+/*
+ * skip over digits and hex characters
+ */
+    char_u *
+skiphex(p)
+    char_u	*p;
+{
+    while (vim_isxdigit(*p))	/* skip to next non-digit */
+	++p;
+    return p;
+}
+#endif
+
 #if defined(FEAT_EX_EXTRA) || defined(PROTO)
 /*
  * skip to digit (or NUL after the string)
diff --git a/src/edit.c b/src/edit.c
index f4682c0..ebfe7fd 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4568,6 +4568,7 @@
     char_u	*old;
     char_u	*new, *pnew;
     int		wasatend;
+    int		cc;
 
     if (!has_format_option(FO_AUTO))
 	return;
@@ -4587,11 +4588,12 @@
     if (*old != NUL && !trailblank && wasatend)
     {
 	dec_cursor();
-	if (!WHITECHAR(gchar_cursor())
-		&& curwin->w_cursor.col > 0
-		&& has_format_option(FO_ONE_LETTER))
+	cc = gchar_cursor();
+	if (!WHITECHAR(cc) && curwin->w_cursor.col > 0
+					  && has_format_option(FO_ONE_LETTER))
 	    dec_cursor();
-	if (WHITECHAR(gchar_cursor()))
+	cc = gchar_cursor();
+	if (WHITECHAR(cc))
 	{
 	    curwin->w_cursor = pos;
 	    return;
@@ -4672,10 +4674,12 @@
     int		end_insert;	    /* TRUE when ending Insert mode */
 {
     int		c = ' ';
+    int		cc;
 
     if (did_add_space)
     {
-	if (!WHITECHAR(gchar_cursor()))
+	cc = gchar_cursor();
+	if (!WHITECHAR(cc))
 	    /* Somehow the space was removed already. */
 	    did_add_space = FALSE;
 	else
diff --git a/src/eval.c b/src/eval.c
index 1051beb..cdc2f5f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5086,7 +5086,7 @@
 	++idx;
     if (li == NULL)
 	return -1;
-    return idx;;
+    return idx;
 }
 
 /*
@@ -14820,6 +14820,8 @@
     char_u  *name;
     char_u  **varname;
 {
+    hashitem_T	*hi;
+
     if (name[1] != ':')
     {
 	/* The name must not start with a colon or #. */
@@ -14828,7 +14830,8 @@
 	*varname = name;
 
 	/* "version" is "v:version" in all scopes */
-	if (!HASHITEM_EMPTY(hash_find(&compat_hashtab, name)))
+	hi = hash_find(&compat_hashtab, name);
+	if (!HASHITEM_EMPTY(hi))
 	    return &compat_hashtab;
 
 	if (current_funccal == NULL)
@@ -17650,7 +17653,7 @@
 {
     char_u	*s, *p, *pbuf2, *pbuf3;
     char_u	ch;
-    int		l,len,len2,plen,slen;
+    int		len, len2, plen, slen;
 
     /* Make a copy */
     len2 = *fnamelen;
@@ -17661,7 +17664,6 @@
     slen = 1;
     plen = len2;
 
-    l = 0;
     if (after_pathsep(pbuf2, s + 1))
     {
 	--s;
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2262794..bf04185 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1813,7 +1813,7 @@
     if (fp_out == NULL)
     {
 	EMSG2(_("E138: Can't write viminfo file %s!"),
-		       (fp_in == NULL || tempname == NUL) ? fname : tempname);
+		       (fp_in == NULL || tempname == NULL) ? fname : tempname);
 	if (fp_in != NULL)
 	    fclose(fp_in);
 	goto end;
diff --git a/src/ex_getln.c b/src/ex_getln.c
index a71b68e..5d04ad3 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5297,7 +5297,7 @@
 		p = history[type][i].hisstr;
 		if (p != NULL)
 		{
-		    putc(hist_type2char(type, TRUE), fp);
+		    fputc(hist_type2char(type, TRUE), fp);
 		    /* For the search history: put the separator in the second
 		     * column; use a space if there isn't one. */
 		    if (type == HIST_SEARCH)
diff --git a/src/fileio.c b/src/fileio.c
index 9f38101..5b27b62 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -765,6 +765,7 @@
     else if (curbuf->b_help)
     {
 	char_u	    firstline[80];
+	int	    fc;
 
 	/* Help files are either utf-8 or latin1.  Try utf-8 first, if this
 	 * fails it must be latin1.
@@ -774,18 +775,22 @@
 	 * That is only in *.??x files. */
 	fenc = (char_u *)"latin1";
 	c = enc_utf8;
-	if (!c && !read_stdin && TOLOWER_ASC(fname[STRLEN(fname) - 1]) == 'x')
+	if (!c && !read_stdin)
 	{
-	    /* Read the first line (and a bit more).  Immediately rewind to
-	     * the start of the file.  If the read() fails "len" is -1. */
-	    len = vim_read(fd, firstline, 80);
-	    lseek(fd, (off_t)0L, SEEK_SET);
-	    for (p = firstline; p < firstline + len; ++p)
-		if (*p >= 0x80)
-		{
-		    c = TRUE;
-		    break;
-		}
+	    fc = fname[STRLEN(fname) - 1];
+	    if (TOLOWER_ASC(fc) == 'x')
+	    {
+		/* Read the first line (and a bit more).  Immediately rewind to
+		 * the start of the file.  If the read() fails "len" is -1. */
+		len = vim_read(fd, firstline, 80);
+		lseek(fd, (off_t)0L, SEEK_SET);
+		for (p = firstline; p < firstline + len; ++p)
+		    if (*p >= 0x80)
+		    {
+			c = TRUE;
+			break;
+		    }
+	    }
 	}
 
 	if (c)
diff --git a/src/hashtable.c b/src/hashtable.c
index a8cd1b7..d4177d3 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -275,6 +275,7 @@
     ++ht->ht_locked;
 }
 
+#if 0	    /* currently not used */
 /*
  * Lock a hashtable at the specified number of entries.
  * Caller must make sure no more than "size" entries will be added.
@@ -288,6 +289,7 @@
     (void)hash_may_resize(ht, size);
     ++ht->ht_locked;
 }
+#endif
 
 /*
  * Unlock a hashtable: allow ht_array changes again.
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 3e5e26c..7163c8a 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -559,7 +559,7 @@
     static int
 cs_check_for_tags()
 {
-    return (p_tags[0] != NUL && curbuf->b_p_tags != NUL);
+    return (p_tags[0] != NUL && curbuf->b_p_tags != NULL);
 } /* cs_check_for_tags */
 
 
@@ -1202,6 +1202,9 @@
     csinfo[i].pid    = -1;
     csinfo[i].fr_fp  = NULL;
     csinfo[i].to_fp  = NULL;
+#if defined(WIN32)
+    csinfo[i].hProc = NULL;
+#endif
 }
 
 #ifndef UNIX
@@ -2090,7 +2093,7 @@
 	(void)fflush(csinfo[i].to_fp);
     }
     /* give cscope chance to exit normally */
-    if (csinfo[i].hProc > 0
+    if (csinfo[i].hProc != NULL
 	    && WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
 	TerminateProcess(csinfo[i].hProc, 0);
 #endif
diff --git a/src/mbyte.c b/src/mbyte.c
index 9504012..71a03a5 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -426,9 +426,6 @@
     vimconv_T	vimconv;
     char_u	*p;
 #endif
-#ifdef WIN32
-    int		prev_enc_utf8 = enc_utf8;
-#endif
 
     if (p_enc == NULL)
     {
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index e56eb92..45cade6 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -1,5 +1,5 @@
 /* spell.c */
-int spell_check __ARGS((win_T *wp, char_u *line, char_u *ptr, int *attrp));
+int spell_check __ARGS((win_T *wp, char_u *ptr, int *attrp));
 int spell_move_to __ARGS((int dir, int allwords));
 char_u *did_set_spelllang __ARGS((buf_T *buf));
 void spell_reload __ARGS((void));
diff --git a/src/screen.c b/src/screen.c
index 0139788..8c6dba1 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -243,7 +243,7 @@
 }
 
 /*
- * Mark all windows that are editing the current buffer to be udpated later.
+ * Mark all windows that are editing the current buffer to be updated later.
  */
     void
 redraw_curbuf_later(type)
@@ -725,7 +725,7 @@
  * VALID	1. scroll up/down to adjust for a changed w_topline
  *		2. update lines at the top when scrolled down
  *		3. redraw changed text:
- *		   - if wp->w_buffer->b_mod_set set, udpate lines between
+ *		   - if wp->w_buffer->b_mod_set set, update lines between
  *		     b_mod_top and b_mod_bot.
  *		   - if wp->w_redraw_top non-zero, redraw lines between
  *		     wp->w_redraw_top and wp->w_redr_bot.
@@ -2504,8 +2504,6 @@
     int		has_spell = FALSE;	/* this buffer has spell checking */
     int		spell_attr = 0;		/* attributes desired by spelling */
     int		word_end = 0;		/* last byte with same spell_attr */
-    int		iswordc;		/* prev. char was a word character */
-    int		prev_iswordc = FALSE;	/* prev. char was a word character */
 #endif
     int		extra_check;		/* has syntax or linebreak */
 #ifdef FEAT_MBYTE
@@ -3246,11 +3244,6 @@
 	    else
 		char_attr = search_attr;
 
-#ifdef FEAT_SYN_HL
-	    if (spell_attr != 0)
-		char_attr = hl_combine_attr(char_attr, spell_attr);
-#endif
-
 #ifdef FEAT_DIFF
 	    if (diff_hlf != (enum hlf_value)0 && n_extra == 0)
 	    {
@@ -3586,9 +3579,11 @@
 
 		    if (area_attr == 0 && search_attr == 0)
 			char_attr = syntax_attr;
+		    else
+			char_attr = hl_combine_attr(char_attr, syntax_attr);
 		}
 
-		/* Check spelling at the start of a word.
+		/* Check spelling (unless at the end of the line).
 		 * Only do this when there is no syntax highlighting, there is
 		 * on @Spell cluster or the current syntax item contains the
 		 * @Spell cluster. */
@@ -3597,33 +3592,27 @@
 		    spell_attr = 0;
 		    if (area_attr == 0 && search_attr == 0)
 			char_attr = syntax_attr;
-		    if (!has_syntax || can_spell)
+		    if (c != 0 && (!has_syntax || can_spell))
 		    {
-			char_u	*prev_ptr = ptr - (
 # ifdef FEAT_MBYTE
-							has_mbyte ? mb_l :
+			char_u	*prev_ptr = ptr - (has_mbyte ? mb_l : 1);
+# else
+			char_u	*prev_ptr = ptr - 1;
 # endif
-									    1);
+			word_end = v + spell_check(wp, prev_ptr, &spell_attr);
 
-			iswordc = spell_iswordc(prev_ptr);
-			if (iswordc && !prev_iswordc)
-			{
-			    word_end = v + spell_check(wp, line, prev_ptr,
-								 &spell_attr);
-			    /* In Insert mode only highlight a word that
-			     * doesn't touch the cursor. */
-			    if (spell_attr != 0
-				    && (State & INSERT) != 0
-				    && wp->w_cursor.lnum == lnum
-				    && wp->w_cursor.col >=
+			/* In Insert mode only highlight a word that
+			 * doesn't touch the cursor. */
+			if (spell_attr != 0
+				&& (State & INSERT) != 0
+				&& wp->w_cursor.lnum == lnum
+				&& wp->w_cursor.col >=
 						    (colnr_T)(prev_ptr - line)
-				    && wp->w_cursor.col < (colnr_T)word_end)
-			    {
-				spell_attr = 0;
-				spell_redraw_lnum = lnum;
-			    }
+				&& wp->w_cursor.col < (colnr_T)word_end)
+			{
+			    spell_attr = 0;
+			    spell_redraw_lnum = lnum;
 			}
-			prev_iswordc = iswordc;
 		    }
 		}
 		if (spell_attr != 0)
diff --git a/src/search.c b/src/search.c
index 5ffcb36..9d29817 100644
--- a/src/search.c
+++ b/src/search.c
@@ -375,11 +375,13 @@
 #endif
 		if (*p == '\\' && p[1] != NUL)	/* skip "\S" et al. */
 		    p += 2;
-		else if (isupper(*p++))
+		else if (isupper(*p))
 		{
 		    ic = FALSE;
 		    break;
 		}
+		else
+		    ++p;
 	}
     }
     no_smartcase = FALSE;
diff --git a/src/syntax.c b/src/syntax.c
index fc2710a..d8e781a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3143,6 +3143,8 @@
     for (i = buf->b_syn_clusters.ga_len; --i >= 0; )
 	syn_clear_cluster(buf, i);
     ga_clear(&buf->b_syn_clusters);
+    buf->b_spell_cluster_id = 0;
+    buf->b_nospell_cluster_id = 0;
 
     buf->b_syn_sync_flags = 0;
     buf->b_syn_sync_minlines = 0;
@@ -6003,7 +6005,6 @@
 	"StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold",
 	"StatusLineNC term=reverse cterm=reverse gui=reverse",
 	"VertSplit term=reverse cterm=reverse gui=reverse",
-	"Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg",
 	"VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold",
 	"DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red",
 	NULL
@@ -6027,6 +6028,7 @@
 	"Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue",
 	"FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
 	"SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
+	"Visual term=reverse ctermbg=Blue guibg=Blue",
 	"DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue",
 	"DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
 	"DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
@@ -6051,6 +6053,7 @@
 	"Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan",
 	"FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
 	"SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
+	"Visual term=reverse ctermbg=Blue guibg=Blue",
 	"DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue",
 	"DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
 	"DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
@@ -7765,6 +7768,8 @@
     didh = highlight_list_arg(id, didh, LIST_STRING,
 				    0, sgp->sg_gui_bg_name, "guibg");
     didh = highlight_list_arg(id, didh, LIST_STRING,
+				    0, sgp->sg_gui_sp_name, "guisp");
+    didh = highlight_list_arg(id, didh, LIST_STRING,
 				    0, sgp->sg_font_name, "font");
 #endif
 
diff --git a/src/version.h b/src/version.h
index 9b19072..3fa4e3d 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 1)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 1, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 4)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 4, compiled "