updated for version 7.0132
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index e077e25..c797bec 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,8 +1,8 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            AUTOLOAD PORTION
-" Last Change:	Aug 16, 2005
+" Last Change:	Aug 19, 2005
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version:	63
+" Version:	65
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
 "               Permission is hereby granted to use and distribute this code,
@@ -690,8 +690,6 @@
    exe a:readcmd." ".v:cmdarg." ".fname
    let line1        = curline + 1
    let line2        = line("$") - lastline + 1
-   let s:netrw_line = s:netrw_line + 1
-   let s:netrw_col  = 1
   else
    " not readable
 "   call Dret("NetGetFile : fname<".fname."> not readable")
@@ -1025,6 +1023,8 @@
    return
   endif
 
+  call s:NetOptionSave()
+
   " sanity check
   if exists("b:netrw_method") && b:netrw_method =~ '[235]'
 "   call Decho("b:netrw_method=".b:netrw_method)
@@ -1033,6 +1033,7 @@
      echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ftp" | echohl None
      call inputsave()|call input("Press <cr> to continue")|call inputrestore()
     endif
+    call s:NetOptionRestore()
 "    call Dret("NetBrowse")
     return
    endif
@@ -1042,6 +1043,7 @@
     call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    endif
 
+    call s:NetOptionRestore()
 "   call Dret("NetBrowse")
    return
   endif
@@ -1061,6 +1063,7 @@
     echohl Error | echo "***netrw*** netrw doesn't understand your dirname<".dirname.">" | echohl None
     call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    endif
+    call s:NetOptionRestore()
 "   call Dret("NetBrowse : badly formatted dirname<".dirname.">")
    return
   endif
@@ -1109,6 +1112,7 @@
 "   call Decho("attempt transfer of symlink as file")
    call s:NetBrowse(substitute(dirname,'@$','','e'))
    redraw!
+   call s:NetOptionRestore()
 "   call Dret("NetBrowse : symlink")
    return
 
@@ -1119,7 +1123,7 @@
    " remove any filetype indicator from end of dirname, except for the
    " "this is a directory" indicator (/).  There shouldn't be one of those,
    " anyway.
-   let path= substitute(path,'[*=@|]$','','e')
+   let path= substitute(path,'[*=@|]\r\=$','','e')
 "   call Decho("new path<".path.">")
 
    " remote-read the requested file into current buffer
@@ -1133,7 +1137,7 @@
 
    " save certain window-oriented variables into buffer-oriented variables
    call s:BufWinVars()
-
+   call s:NetOptionRestore()
    setlocal nonu nomod noma
 
 "   call Dret("NetBrowse : file<".fname.">")
@@ -1152,6 +1156,7 @@
 "   call Decho("buffer already exists, switching to it")
    exe "b ".bufnamenr
    if line("$") >= 5
+    call s:NetOptionRestore()
 "    call Dret("NetBrowse")
     return
    endif
@@ -1166,7 +1171,7 @@
 "  call Decho("exe file ".escape(bufname,s:netrw_cd_escape))
   exe 'file '.escape(bufname,s:netrw_cd_escape)
 "  call Decho("renaming file to bufname<".bufname.">")
-  setlocal bh=hide nobl nonu
+  setlocal bh=hide bt=nofile nobl nonu
 
   " save current directory on directory history list
   call <SID>NetBookmarkDir(3,expand("%"))
@@ -1281,7 +1286,6 @@
     exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d"
    endif
   endif
-  
 
   " set up syntax highlighting
   if has("syntax")
@@ -1347,8 +1351,12 @@
     endif
    endif
   endif
+
+  " cleanup any windows mess at end-of-line
+  keepjumps silent! %s/\r$//e
   exe "keepjumps ".w:netrw_bannercnt
 
+  call s:NetOptionRestore()
   setlocal nomod noma nonu
 
 "  call Dret("NetBrowse")
@@ -1772,6 +1780,16 @@
    endif
   endif
 
+  " ftp's ls doesn't seem to include ./ or ../
+  if !search('^\.\/$','wn')
+   exe 'keepjumps '.curline
+   if a:path !~ '^$'
+    put ='../'
+   endif
+   put ='./'
+   exe 'keepjumps '.curline
+  endif
+
   " restore settings
   let &ff= ffkeep
 "  call Dret("NetBrowseFtpCmd")
@@ -2128,22 +2146,18 @@
 "   call Dret("DirBrowse")
    return
   endif
+  call s:NetOptionSave()
 
   if v:version < 603
    if !exists("g:netrw_quiet")
     echohl Error | echo "***netrw*** vim version<".v:version."> too old for browsing with netrw" | echohl None
     call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    endif
+   call s:NetOptionRestore()
 "   call Dret("DirBrowse : vim version<".v:version."> too old")
    return
   endif
 
-  " record autochdir setting and then insure its unset (tnx to David Fishburn)
-  if has("netbeans_intg") || has("sun_workshop")
-   let keep_autochdir= &autochdir
-   set noautochdir
-  endif
-
   " use buffer-oriented WinVars if buffer ones exist but window ones don't
   call s:UseBufWinVars()
 
@@ -2166,7 +2180,7 @@
   endif
 
   " get cleared buffer
-  if bufnum < 0
+  if bufnum < 0 || !bufexists(bufnum)
    if v:version < 700
     enew!
    else
@@ -2185,6 +2199,7 @@
 "      call Decho("change directory: cd ".b:netrw_curdir)
       exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape)
      endif
+     call s:NetOptionRestore()
 "     call Dret("DirBrowse : reusing buffer#".bufnum."<".a:dirname.">")
      return
     endif
@@ -2201,6 +2216,11 @@
   if b:netrw_curdir =~ '[/\\]$'
    let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
   endif
+  if b:netrw_curdir == ''
+   " under unix, when the root directory is encountered, the result
+   " from the preceding substitute is an empty string.
+   let b:netrw_curdir= '/'
+  endif
 "  call Decho("b:netrw_curdir<".b:netrw_curdir.">")
 
   " make netrw's idea of the current directory vim's if the user wishes
@@ -2214,6 +2234,7 @@
     if exists("w:netrw_prvdir")
      let b:netrw_curdir= w:netrw_prvdir
     else
+     call s:NetOptionRestore()
 "     call Dret("DirBrowse : reusing buffer#".bufnum."<".a:dirname.">")
      return
     endif
@@ -2223,8 +2244,8 @@
   " change the name of the buffer to reflect the b:netrw_curdir
   exe 'silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape)
 
-  " make this buffer modifiable and hidden
-  setlocal ma hidden nonu bt=nofile
+  " make this buffer not-a-file, modifiable, not line-numbered, etc
+  setlocal bh=hide bt=nofile nobl ma nonu
   if v:version < 700
    silent! %d
   else
@@ -2367,11 +2388,8 @@
 
   " save certain window-oriented variables into buffer-oriented variables
   call s:BufWinVars()
-
+  call s:NetOptionRestore()
   setlocal noma nomod nonu bh=hide nobl
-  if has("netbeans_intg") || has("sun_workshop")
-   let &autochdir= keep_autochdir
-  endif
 
 "  call Dret("DirBrowse : file<".expand("%:p")."> bufname<".bufname("%").">")
 endfun
@@ -2470,6 +2488,9 @@
     keepjumps put=pfile
    endif
   endwhile
+  
+  " cleanup any windows mess at end-of-line
+  keepjumps silent! %s/\r$//e
   setlocal ts=32
 
 "  call Dret("LocalBrowseList")
@@ -3091,27 +3112,42 @@
 
 " ------------------------------------------------------------------------
 " NetOptionSave: save options and set to "standard" form {{{1
-fun!s:NetOptionSave()
+fun! s:NetOptionSave()
 "  call Dfunc("NetOptionSave()")
+  if !exists("w:netoptionsave")
+   let w:netoptionsave= 1
+  else
+"   call Dret("NetOptionSave : netoptionsave=".w:netoptionsave)
+   return
+  endif
 
   " Get Temporary Filename
-  let s:aikeep	= &ai
-  let s:cinkeep	= &cin
-  let s:cinokeep = &cino
-  let s:comkeep	= &com
-  let s:cpokeep	= &cpo
-  let s:dirkeep	= getcwd()
-  let s:gdkeep	= &gd
-  let s:twkeep	= &tw
+  let w:aikeep   = &ai
+  " record autochdir setting and then insure its unset (tnx to David Fishburn)
+  if has("netbeans_intg") || has("sun_workshop")
+   let w:acdkeep = &autochdir
+   set noautochdir
+  endif
+  let w:cinkeep  = &cin
+  let w:cinokeep = &cino
+  let w:comkeep  = &com
+  let w:cpokeep  = &cpo
+  if !g:netrw_keepdir
+   let w:dirkeep = getcwd()
+  endif
+  let w:gdkeep   = &gd
+  let w:repkeep  = &report
+  let w:twkeep   = &tw
   setlocal cino =
   setlocal com  =
   setlocal cpo -=aA
   setlocal nocin noai
   setlocal tw   =0
+  setlocal report=10000
   if has("win32") && !has("win95")
-   let s:swfkeep= &swf
+   let w:swfkeep= &swf
    setlocal noswf
-"  call Decho("setting s:swfkeep to <".&swf.">")
+"  call Decho("setting w:swfkeep to <".&swf.">")
   endif
 
 "  call Dret("NetOptionSave")
@@ -3121,36 +3157,50 @@
 " NetOptionRestore: restore options {{{1
 fun! s:NetOptionRestore()
 "  call Dfunc("NetOptionRestore()")
+  if !exists("w:netoptionsave")
+"   call Dret("NetOptionRestore : netoptionsave=".w:netoptionsave)
+   return
+  endif
+  unlet w:netoptionsave
  
-  let &ai	= s:aikeep
-  let &cin	= s:cinkeep
-  let &cino	= s:cinokeep
-  let &com	= s:comkeep
-  let &cpo	= s:cpokeep
-  exe "lcd ".s:dirkeep
-  let &gd	= s:gdkeep
-  let &tw	= s:twkeep
-  if exists("s:swfkeep")
+  let &ai	= w:aikeep
+  if has("netbeans_intg") || has("sun_workshop")
+   let &acd     = w:acdkeep
+  endif
+  let &cin	= w:cinkeep
+  let &cino	= w:cinokeep
+  let &com	= w:comkeep
+  let &cpo	= w:cpokeep
+  if exists("w:dirkeep")
+   exe "lcd ".w:dirkeep
+  endif
+  let &gd	= w:gdkeep
+  let &report   = w:repkeep
+  let &tw	= w:twkeep
+  if exists("w:swfkeep")
    if &directory == ""
     " user hasn't specified a swapfile directory;
     " netrw will temporarily make the swapfile
     " directory the current local one.
     let &directory   = getcwd()
-    silent! let &swf = s:swfkeep
+    silent! let &swf = w:swfkeep
     set directory=
    else
-    let &swf= s:swfkeep
+    let &swf= w:swfkeep
    endif
-   unlet s:swfkeep
+   unlet w:swfkeep
   endif
-  unlet s:aikeep
-  unlet s:cinkeep
-  unlet s:cinokeep
-  unlet s:comkeep
-  unlet s:cpokeep
-  unlet s:gdkeep
-  unlet s:twkeep
-  unlet s:dirkeep
+  unlet w:aikeep
+  unlet w:cinkeep
+  unlet w:cinokeep
+  unlet w:comkeep
+  unlet w:cpokeep
+  unlet w:gdkeep
+  unlet w:repkeep
+  unlet w:twkeep
+  if exists("w:dirkeep")
+   unlet w:dirkeep
+  endif
  
 "  call Dret("NetOptionRestore")
 endfun
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 61a22df..c189596 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4692,10 +4692,7 @@
 	function SetFileTypeSH(name)
 	    Last set from /usr/share/vim/vim-7.0/filetype.vim
 <
-When the function was defined by hand there is no "Last set" message.  When
-the function was defined while executing a function, user command or
-autocommand, the script in which it was defined is reported.
-{not available when compiled without the +eval feature}
+See |:verbose-cmd| for more information.
 
  							*E124* *E125*
 :fu[nction][!] {name}([arguments]) [range] [abort] [dict]
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d15d454..56a91b6 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2005 Aug 12
+*options.txt*	For Vim version 7.0aa.  Last change: 2005 Aug 18
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -4284,6 +4284,45 @@
 	generated from a list of items, e.g., the Buffers menu.  Changing this
 	option has no direct effect, the menu must be refreshed first.
 
+						*'mkspellmem'* *'msm'*
+'mkspellmem' 'msm'	string	(default "460000,2000,500")
+			global
+			{not in Vi}
+			{not available when compiled without the |+syntax|
+			feature}
+	Parameters for |:mkspell|.  This tunes when to start compressing the
+	word tree.  Compression can be slow when there are many words, but
+	it's needed to avoid running out of memory.  The amount of memory used
+	per word depends very much on how similar the words are, that's why
+	this tuning is complicated.
+
+	There are three numbers, separated by commas:
+		{start},{inc},{added}
+
+	For most languages the uncompressed word tree fits in memory.  {start}
+	gives the amount of memory in Kbyte that can be used before any
+	compression is done.  It should be a bit smaller than the amount of
+	memory that is available to Vim.
+
+	When going over the {start} limit the {inc} number specifies the
+	amount of memory in Kbyte that can be allocated before another
+	compression is done.  A low number means compression is done after
+	less words are added, which is slow.  A high number means more memory
+	will be allocated.
+
+	After doing compression, {added} times 1024 words can be added before
+	the {inc} limit is ignored and compression is done when any extra
+	amount of memory is needed.  A low number means there is a smaller
+	chance of hitting the {inc} limit, less memory is used but it's
+	slower.
+
+	The languages for which these numbers are important are Italian and
+	Hungarian.  The default works for when you have about 512 Mbyte.  If
+	you have 1 Gbyte you could use: >
+		:set mkspellmem=900000,3000,800
+<	If you have less than 512 Mbyte |:mkspell| may fail for some
+	languages, no matter what you set 'mkspellmem' to.
+
 				   *'modeline'* *'ml'* *'nomodeline'* *'noml'*
 'modeline' 'ml'		boolean	(Vim default: on, Vi default: off)
 			local to buffer
@@ -5696,7 +5735,7 @@
 			feature}
 	Pattern to locate the end of a sentence.  The following word will be
 	checked to start with a capital letter.  If not then it is highlighted
-	with SpellCap |hl-SpellCap|.
+	with SpellCap |hl-SpellCap| (unless the word is also badly spelled).
 	When this check is not wanted make this option empty.
 	Only used when 'spell' is set.
 	Be careful with special characters, see |option-backslash| about
@@ -5749,6 +5788,7 @@
 	region by listing them: "en_us,en_ca" supports both US and Canadian
 	English, but not words specific for Australia, New Zealand or Great
 	Britain.
+							*E757*
 	As a special case the name of a .spl file can be given as-is.  The
 	first "_xx" in the name is removed and used as the region name
 	(_xx is an underscore, two letters and followed by a non-letter).
@@ -5789,6 +5829,11 @@
 			character inserts/deletes/swaps.  Works well for
 			simple typing mistakes.
 
+	{number}	The maximum number of suggestions listed for |z?|.
+			Not used for |spellsuggest()|.  The number of
+			suggestions is never more than the value of 'lines'
+			minus two.
+
 	file:{filename} Read file {filename}, which must have two columns,
 			separated by a slash.  The first column contains the
 			bad word, the second column the suggested good word.
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 078d754..84e9bf5 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt*   For Vim version 7.0aa.  Last change: 2005 Aug 14
+*pattern.txt*   For Vim version 7.0aa.  Last change: 2005 Aug 18
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -943,9 +943,10 @@
 	"\_[^ab]" matches the end-of-line and any character but "a" and "b".
 	This makes it Vi compatible: Without the "\_" or "\n" the collection
 	does not match an end-of-line.
-
+								*E769*
 	When the ']' is not there Vim will not give an error message but
-	assume no collection is used.  Useful to search for '['.
+	assume no collection is used.  Useful to search for '['.  However, you
+	do get E769 for internal searching.
 
 	If the sequence begins with "^", it matches any single character NOT
 	in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 0071883..48ee880 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1217,6 +1217,11 @@
 ==============================================================================
 10. History						*netrw-history*
 
+	v64: * Browser functions now use NetOptionSave/Restore; in particular,
+	       netrw now works around the report setting
+	     * Bugfix - browsing a "/" directory (Unix) yielded buffers 
+	       named "[Scratch]" instead of "/"
+	     * Bugfix - remote browsing with ftp was omitting the ./ and ../
 	v63: * netrw now takes advantage of autoload (and requires 7.0)
 	     * Bugfix - using r (to reverse sort) working again
 	v62: * Bugfix - spaces allowed again in directory names with
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 929c106..2ec2eba 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt*	For Vim version 7.0aa.  Last change: 2005 Aug 16
+*spell.txt*	For Vim version 7.0aa.  Last change: 2005 Aug 19
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -433,8 +433,12 @@
 			|spell-affix-SAL|
 
 			This command uses a lot of memory, required to find
-			the optimal word tree (Polish requires a few hundred
-			Mbyte).  The final result will be much smaller.
+			the optimal word tree (Polish, Italian and Hungarian
+			require several hundred Mbyte).  The final result will
+			be much smaller, because compression is used.  To
+			avoid running out of memory compression will be done
+			now and then.  This can be tuned with the 'mkspellmem'
+			option.
 
 			After the spell file was written and it was being used
 			in a buffer it will be reloaded automatically.
@@ -452,7 +456,8 @@
 Vim will report the number of duplicate words.  This might be a mistake in the
 list of words.  But sometimes it is used to have different prefixes and
 suffixes for the same basic word to avoid them combining (e.g. Czech uses
-this).
+this).  If you want Vim to report all duplicate words set the 'verbose'
+option.
 
 Since you might want to change a Myspell word list for use with Vim the
 following procedure is recommended:
@@ -477,6 +482,25 @@
 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
 
 
+SPELL FILE VERSIONS					*E770* *E771* *E772*
+
+Spell checking is a relatively new feature in Vim, thus it's possible that the
+.spl file format will be changed to support more languages.  Vim will check
+the validity of the spell file and report anything wrong.
+
+	E771: Old spell file, needs to be updated ~
+This spell file is older than your Vim.  You need to update the .spl file.
+
+	E772: Spell file is for newer version of Vim ~
+This means the spell file was made for a later version of Vim.  You need to
+update Vim.
+
+	E770: Unsupported section in spell file ~
+This means the spell file was made for a later version of Vim and contains a
+section that is required for the spell file to work.  In this case it's
+probably a good idea to upgrade your Vim.
+
+
 SPELL FILE DUMP
 
 If for some reason you want to check what words are supported by the currently
@@ -736,6 +760,7 @@
 	SFX F 0 in   [^i]n      # Spion > Spionin  ~
 	SFX F 0 nen  in         # Bauerin > Bauerinnen ~
 
+							*spell-affix-rare*
 An extra item for Vim is the "rare" flag.  It must come after the other
 fields, before a comment.  When used then all words that use the affix will be
 marked as rare words.  Example:
@@ -746,6 +771,22 @@
 However, if the word also appears as a good word in another way it won't be
 marked as rare.
 
+							*spell-affix-nocomp*
+Another extra item for Vim is the "nocomp" flag.  It must come after the other
+fields, before a comment.  It can be either before or after "rare".  When used
+then all words that use the affix will not be used for compound words.
+Example:
+	affix file:
+		COMPOUNDFLAG c ~
+		SFX a Y 2 ~
+		SFX a 0 s   . ~
+		SFX a 0 ize . nocomp ~
+	dictionary:
+		word/c ~
+		util/ac ~
+
+This allows for "wordutil" and "wordutils" but not "wordutilize".
+
 						    *spell-affix-PFXPOSTPONE*
 When an affix file has very many prefixes that apply to many words it's not
 possible to build the whole word list in memory.  This applies to Hebrew (a
@@ -761,9 +802,6 @@
 but in lower case.  Thus when the chop string is used to allow the following
 word to start with an upper case letter.
 
-It is not possible to use PFXPOSTPONE together with COMPOUNDFLAG or
-COMPOUNDFLAGS.
-
 
 WORDS WITH A SLASH					*spell-affix-SLASH*
 
@@ -818,86 +856,73 @@
 Once a word has been marked as bad it won't be undone by encountering the same
 word as good.
 
+							*spell-affix-NEEDAFFIX*
+The NEEDAFFIX flag is used to require that a word is used with an affix.  The
+word itself is not a good word.  Example:
+
+	NEEDAFFIX + ~
+
 
 COMPOUND WORDS						*spell-affix-compound*
 
-A compound word is a longer word made by concatenating words.  To specify
-which words may be concatenated a character is used.  This character is put in
-the list of affixes after the word.  We will call this character a flag here.
-Obviously these flags must be different from any affix IDs used.
+A compound word is a longer word made by concatenating words that appear in
+the .dic file.  To specify which words may be concatenated a character is
+used.  This character is put in the list of affixes after the word.  We will
+call this character a flag here.  Obviously these flags must be different from
+any affix IDs used.
 
 							*spell-COMPOUNDFLAG*
 The Myspell compatible method uses one flag, specified with COMPOUNDFLAG.
-All words with this flag combine in any order and without limit in length.
-This means there is no control over which word comes first.  Example:
+All words with this flag combine in any order.  This means there is no control
+over which word comes first.  Example:
 	COMPOUNDFLAG c ~
 
 							*spell-COMPOUNDFLAGS*
-The method added by Vim allows specifying which words can be prepended to
-other words, and which words can be appended to other words.  This is a list
-of comma separated items.  Each item may contain zero or more dashes and plus
-signs.
+A more advanced method to specify how compound words can be formed uses
+multiple items with multiple flags.  This is not compatible with Myspell 3.0.
+Let's start with an example:
+	COMPOUNDFLAGS c+ ~
+	COMPOUNDFLAGS se ~
 
-NOTE: At this moment COMPOUNDFLAGS has not been implemented yet!
+The first line defines that words with the "c" flag can be concatenated in any
+order.  The second line defines compound words that are made of one word with
+the "s" flag and one word with the "e" flag.  With this dictionary:
+	bork/c ~
+	onion/s ~
+	soup/e ~
 
-An item without dashes specifies words that combine in any order and as often
-as possible.  Example:
-	COMPOUNDFLAGS c,m ~
-
-This allows all words with the "c" flag to be combined and all words with the
-"m" flag to be combined, but a word with the "c" flag doesn't combine with a
-word with the "m" flag.
-
-Flags that are put together, without a separating comma, are considered
-interchangable.  Example:
-	COMPOUNDFLAGS cm ~
-
-This allows all words with the "c" and/or "m" flag to be combined.
-
-An item with one dash specifies flags for a leading word and flags for a
-trailing word.  Thus only two-word combinations are made.  Example:
-	COMPOUNDFLAGS f-d ~
-
-Here the 'f' flag can be used for food and 'd' for dishes, such that you can
-use these words in the dictionary:
-	tomato/f ~
-	onion/f~
-	soup/d~
-	salat/d~
-
-Which makes the words:
-	tomato
+You can make these words:
+	bork
+	borkbork
+	borkborkbork
+	(etc.)
 	onion
 	soup
-	salat
-	tomatosoup
-	tomatosalat
 	onionsoup
-	onionsalat
 
-Note that something like "souptomato" is not possible.  And that it's actually
-easier to list all the words if you have only this few.
+The COMPOUNDFLAGS item may appear multiple times.  The argument is made out of
+one or more groups, where each group can be:
+	one flag			e.g., c
+	alternate flags inside []	e.g., [abc]
+Optionally this may be followed by:
+	*	the group appears zero or more times, e.g., sm*e
+	+	the group appears one or more times, e.g., c+
 
-More dashes can be used to allow more words to combine.  For example:
-	COMPOUNDFLAGS f-d,f-f-d ~
+This is similar to the regexp pattern syntax (but not the same!).  A few
+examples with the sequence of word flags they require:
+    COMPOUNDFLAGS x+	    x xx xxx etc.
+    COMPOUNDFLAGS yz	    yz
+    COMPOUNDFLAGS x+z	    xz xxz xxxz etc.
+    COMPOUNDFLAGS yx+	    yx yxx yxxx etc.
 
-Would allow "tomatoonionsoup" (OK, so this is a bad example, but you get the
-idea).
-
-When a word can be used an undetermined number of times use a plus instead of
-a dash.  Example:
-	COMPOUNDFLAGS f+d ~
-
-Then you can make tasty "oniononiontomatotomatosoup".
-
-The "+" may also appear at the end, which means that the last flags can be
-repeated many times.  Example:
-	COMPOUNDFLAGS f-d+ ~
-
-Which allows the use of "onionsoupsoupsoupsoupsoupsoup".
+    COMPOUNDFLAGS [abc]z    az bz cz
+    COMPOUNDFLAGS [abc]+z   az aaz abaz bz baz bcbz cz caz cbaz etc.
+    COMPOUNDFLAGS a[xyz]+   ax axx axyz ay ayx ayzz az azy azxy etc.
+    COMPOUNDFLAGS sm*e	    se sme smme smmme etc.
+    COMPOUNDFLAGS s[xyz]*e  se sxe sxye sxyxe sye syze sze szye szyxe  etc.
 
 							*spell-COMPOUNDMIN*
-The minimal length of a word used for concatenation is specified with
+The minimal byte length of a word used for concatenation is specified with
 COMPOUNDMIN.  Example:
 	COMPOUNDMIN 5 ~
 
@@ -905,39 +930,79 @@
 leave out the compound flag from short words instead, this feature is present
 for compatibility with Myspell.
 
-							*spell-CMP*
-NOTE: At this moment CMP has not been implemented yet!
+							*spell-COMPOUNDMAX*
+The maximum number of words that can be concatenated into a compound word is
+specified with COMPOUNDMAX.  Example:
+	COMPOUNDMAX 3 ~
 
-Sometimes it is necessary to change a word when concatenating it to another,
-by removing a few letters, inserting something or both.  It can also be useful
-to restrict concatenation to words that match a pattern.  For this purpose CMP
-items can be used.  They look like this:
-	CMP {flag} {flags} {strip} {add} {cond} {cond2}
+When omitted there is no maximum.  It applies to all compound words.
 
-	{flag}		the flag, as used in COMPOUNDFLAGS for the lead word
-	{flags}		accepted flags for the following word ('.' to accept
-			all)
-	{strip}		text to remove from the end of the lead word (zero
-			for no stripping)
-	{add}		text to insert between the words (zero for no
-			addition)
-	{cond}		condition to match at the end of the lead word
-	{cond2}		condition to match at the start of the following word
+To set a limit for words with specific flags make sure the items in
+COMPOUNDFLAGS where they appear don't allow too many words.
 
-This is the same as what is used for SFX and PFX items, with the extra {flags}
-and {cond2} fields.  Example:
-	CMP f mrt 0 - . . ~
+							*spell-COMPOUNDSYLMAX*
+The maximum number of syllables that a compound word may contain is specified
+with COMPOUNDSYLMAX.  Example:
+	COMPOUNDSYLMAX 6 ~
 
-When used with the food and dish word list above, this means that a dash is
-inserted after each food item.  Thus you get "onion-soup" and
-"onion-tomato-salat".
+This has no effect if there is no SYLLABLE item.  Without COMPOUNDSYLMAX there
+is no limit on the number of syllables.
 
-When there are CMP items for a compound flag the concatenation is only done
-when a CMP item matches.
+							*spell-SYLLABLE*
+The SYLLABLE item defines characters or character sequences that are used to
+count the number of syllables in a word.  Example:
+	SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~
 
-When there are no CMP items for a compound flag, then all words will be
-concatenated, as if there was an item:
-	CMP {flag} . 0 0 . .
+Before the first slash is the set of characters that are counted for one
+syllable, also when repeated and mixed, until the next character that is not
+in this set.  After the slash come sequences of characters that are counted
+for one syllable.  These are preferred over using characters from the set.
+With the example "ideeen" has three syllables, counted by "i", "ee" and "e".
+
+Only case-folded letters need to be included.
+
+Above another way to restrict compounding was mentioned above: adding "nocomp"
+after an affix causes all words that are made with that affix not be be used
+for compounding. |spell-affix-nocomp|
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+NOTE: The following has not been implemented yet, because there are no word
+lists that support this.
+> 							*spell-CMP*
+> Sometimes it is necessary to change a word when concatenating it to another,
+> by removing a few letters, inserting something or both.  It can also be useful
+> to restrict concatenation to words that match a pattern.  For this purpose CMP
+> items can be used.  They look like this:
+> 	CMP {flag} {flags} {strip} {strip2} {add} {cond} {cond2}
+> 
+> 	{flag}		the flag, as used in COMPOUNDFLAGS for the lead word
+> 	{flags}		accepted flags for the following word ('.' to accept
+> 			all)
+> 	{strip}		text to remove from the end of the lead word (zero
+> 			for no stripping)
+> 	{strip2}	text to remove from the start of the following word
+> 			(zero for no stripping)
+> 	{add}		text to insert between the words (zero for no
+> 			addition)
+> 	{cond}		condition to match at the end of the lead word
+> 	{cond2}		condition to match at the start of the following word
+> 
+> This is the same as what is used for SFX and PFX items, with the extra {flags}
+> and {cond2} fields.  Example:
+> 	CMP f mrt 0 - . . ~
+> 
+> When used with the food and dish word list above, this means that a dash is
+> inserted after each food item.  Thus you get "onion-soup" and
+> "onion-tomato-salat".
+> 
+> When there are CMP items for a compound flag the concatenation is only done
+> when a CMP item matches.
+> 
+> When there are no CMP items for a compound flag, then all words will be
+> concatenated, as if there was an item:
+> 	CMP {flag} . 0 0 . .
+>
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
 REPLACEMENTS						*spell-affix-REP*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 04e76db..a6a03f5 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3654,9 +3654,8 @@
 <	Comment        xxx term=bold ctermfg=4 guifg=Blue ~
            Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~
 
-For details about when this message is given and when it's valid see
-|:set-verbose|.  When ":hi clear" is used then the script where this command
-is used will be mentioned for the default values.
+When ":hi clear" is used then the script where this command is used will be
+mentioned for the default values. See |:verbose-cmd| for more information.
 
 					*highlight-args* *E416* *E417* *E423*
 There are three types of terminals for highlighting:
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 118e324..d996509 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -361,6 +361,7 @@
 'mfd'	options.txt	/*'mfd'*
 'mh'	options.txt	/*'mh'*
 'mis'	options.txt	/*'mis'*
+'mkspellmem'	options.txt	/*'mkspellmem'*
 'ml'	options.txt	/*'ml'*
 'mls'	options.txt	/*'mls'*
 'mm'	options.txt	/*'mm'*
@@ -385,6 +386,7 @@
 'mousetime'	options.txt	/*'mousetime'*
 'mp'	options.txt	/*'mp'*
 'mps'	options.txt	/*'mps'*
+'msm'	options.txt	/*'msm'*
 'mzq'	options.txt	/*'mzq'*
 'mzquantum'	options.txt	/*'mzquantum'*
 'nf'	options.txt	/*'nf'*
@@ -2589,6 +2591,7 @@
 :ve	various.txt	/*:ve*
 :verb	various.txt	/*:verb*
 :verbose	various.txt	/*:verbose*
+:verbose-cmd	various.txt	/*:verbose-cmd*
 :version	various.txt	/*:version*
 :vert	windows.txt	/*:vert*
 :vertical	windows.txt	/*:vertical*
@@ -3735,6 +3738,7 @@
 E753	spell.txt	/*E753*
 E754	spell.txt	/*E754*
 E756	spell.txt	/*E756*
+E757	options.txt	/*E757*
 E758	spell.txt	/*E758*
 E759	spell.txt	/*E759*
 E76	pattern.txt	/*E76*
@@ -3747,7 +3751,11 @@
 E766	eval.txt	/*E766*
 E767	eval.txt	/*E767*
 E768	message.txt	/*E768*
+E769	pattern.txt	/*E769*
 E77	message.txt	/*E77*
+E770	spell.txt	/*E770*
+E771	spell.txt	/*E771*
+E772	spell.txt	/*E772*
 E78	motion.txt	/*E78*
 E79	message.txt	/*E79*
 E80	message.txt	/*E80*
@@ -6385,12 +6393,16 @@
 spell-CMP	spell.txt	/*spell-CMP*
 spell-COMPOUNDFLAG	spell.txt	/*spell-COMPOUNDFLAG*
 spell-COMPOUNDFLAGS	spell.txt	/*spell-COMPOUNDFLAGS*
+spell-COMPOUNDMAX	spell.txt	/*spell-COMPOUNDMAX*
 spell-COMPOUNDMIN	spell.txt	/*spell-COMPOUNDMIN*
+spell-COMPOUNDSYLMAX	spell.txt	/*spell-COMPOUNDSYLMAX*
+spell-SYLLABLE	spell.txt	/*spell-SYLLABLE*
 spell-affix-BAD	spell.txt	/*spell-affix-BAD*
 spell-affix-FOL	spell.txt	/*spell-affix-FOL*
 spell-affix-KEP	spell.txt	/*spell-affix-KEP*
 spell-affix-LOW	spell.txt	/*spell-affix-LOW*
 spell-affix-MAP	spell.txt	/*spell-affix-MAP*
+spell-affix-NEEDAFFIX	spell.txt	/*spell-affix-NEEDAFFIX*
 spell-affix-PFX	spell.txt	/*spell-affix-PFX*
 spell-affix-PFXPOSTPONE	spell.txt	/*spell-affix-PFXPOSTPONE*
 spell-affix-RAR	spell.txt	/*spell-affix-RAR*
@@ -6404,6 +6416,8 @@
 spell-affix-chars	spell.txt	/*spell-affix-chars*
 spell-affix-compound	spell.txt	/*spell-affix-compound*
 spell-affix-mbyte	spell.txt	/*spell-affix-mbyte*
+spell-affix-nocomp	spell.txt	/*spell-affix-nocomp*
+spell-affix-rare	spell.txt	/*spell-affix-rare*
 spell-affix-vim	spell.txt	/*spell-affix-vim*
 spell-dic-format	spell.txt	/*spell-dic-format*
 spell-double-scoring	spell.txt	/*spell-double-scoring*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 2434923..27dd9a7 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Aug 16
+*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Aug 19
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -31,12 +31,19 @@
 -------------------- Known bugs and current work -----------------------
 
 Spelling:
-- Prefer SpellBad over SpellCap highlighting.
-- Add limit for number of suggestions to 'spellsuggest'?
-- CTRL-X s in Insert mode: move cursor back to after badly spelled word?
-- Implement multiple flags for compound words and CMP item.
+- Test counting syllables and comparing against the maximum.
+- Test nocomp flag for affixes.
+
+- When looking for following compound word, also do postponed prefixes.
+
+- Implement multiple flags for compound words and CMP item?
   Await comments from other spell checking authors.
 
+Help tags: something to make it easy to find help about a certain filetype?
+    use ft-c-syntax ft-c-ftplugin etc.?
+
+Mac GUI: pasting lines results in ^M instead of line breaks. (Benjamin Esham)
+
 Mac unicode patch (Da Woon Jung):
 - selecting proportional font breaks display
 - UTF-8 text causes display problems.  Font replacement causes this.
@@ -44,7 +51,7 @@
 Win32: Use the free downloadable compiler 7.1.  Figure out how to do debugging
 (with Agide?) and describe it. (George Reilly)
 
-autoload:
+Autoload:
 - Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
   script names and a help file and produces a script that can be sourced to
   install the scripts in the user's directories.
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index bcb88eb..d0ee58d 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -485,6 +485,14 @@
 			For logging verbose messages in a file use the
 			'verbosefile' option.
 
+							*:verbose-cmd*
+When 'verbose' is non-zero, listing the value of a Vim option or a key map or
+a user-defined function or a command or a highlight group will also display
+where it was last defined.  If it was defined manually then there will be no
+"Last set" message.  When it was defined while executing a function, user
+command or autocommand, the script in which it was defined is reported.
+{not available when compiled without the +eval feature}
+
 							*K*
 K			Run a program to lookup the keyword under the
 			cursor.  The name of the program is given with the
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 96c06e4..5172322 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2005 Aug 16
+" Last Change:	2005 Aug 17
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -823,7 +823,7 @@
 au BufNewFile,BufRead *.mgp			setf mgp
 
 " Mail (for Elm, trn, mutt, rn, slrn)
-au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt-*-\w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
+au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt\w\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
 
 " Mailcap configuration file
 au BufNewFile,BufRead .mailcap,mailcap		setf mailcap
@@ -953,8 +953,8 @@
 au BufNewFile,BufRead *.mush			setf mush
 
 " Mutt setup file
-au BufNewFile,BufRead Muttrc			setf muttrc
-au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc*	call s:StarSetf('muttrc')
+au BufNewFile,BufRead Mutt{ng,}rc			setf muttrc
+au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc*	call s:StarSetf('muttrc')
 
 " Nano
 au BufNewFile,BufRead /etc/nanorc,.nanorc	setf nanorc
@@ -1832,7 +1832,12 @@
 
 fun! s:FTy()
   let n = 1
-  while n < 10 && n < line("$")
+  while n < 100 && n < line("$")
+    let line = getline(n)
+    if line =~ '^\s*%'
+      setf yacc
+      return
+    endif
     if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include'
       setf racc
       return
@@ -1924,7 +1929,7 @@
 au BufNewFile,BufRead [rR]akefile*		call s:StarSetf('ruby')
 
 " Mutt setup file
-au BufNewFile,BufRead muttrc*,Muttrc*		call s:StarSetf('muttrc')
+au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc*		call s:StarSetf('muttrc')
 
 " Nroff macros
 au BufNewFile,BufRead tmac.*			call s:StarSetf('nroff')
diff --git a/runtime/plugin/NetrwPlugin.vim b/runtime/plugin/NetrwPlugin.vim
index b1f5abd..cb39b84 100644
--- a/runtime/plugin/NetrwPlugin.vim
+++ b/runtime/plugin/NetrwPlugin.vim
@@ -1,8 +1,8 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            PLUGIN PORTION
-" Last Change:	Aug 16, 2005
+" Last Change:	Aug 17, 2005
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version:	63
+" Version:	65a	ASTRO-ONLY
 " License:	Vim License  (see vim's :help license)
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -28,7 +28,7 @@
  echoerr "***netrw*** doesn't support Vim version ".v:version
  finish
 endif
-let g:loaded_netrw  = "v63"
+let g:loaded_netrw  = "v65a"
 if v:version < 700
  let loaded_explorer = 1
 endif
diff --git a/runtime/spell/en.latin1.spl b/runtime/spell/en.latin1.spl
index 95b5363..6035042 100644
--- a/runtime/spell/en.latin1.spl
+++ b/runtime/spell/en.latin1.spl
Binary files differ
diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim
index a98f281..0cd534d 100644
--- a/runtime/syntax/bib.vim
+++ b/runtime/syntax/bib.vim
@@ -2,8 +2,7 @@
 " Language:	BibTeX (bibliographic database format for (La)TeX)
 " Maintainer:	Bernd Feige <Bernd.Feige@gmx.net>
 " Filenames:	*.bib
-" Last Change:	Apr 26, 2001
-" URL:		http://home.t-online.de/home/Bernd.Feige/bib.vim
+" Last Change:	Aug 02, 2005
 
 " Thanks to those who pointed out problems with this file or supplied fixes!
 
@@ -47,7 +46,7 @@
 syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1
 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField
 syn match bibVariable contained /[^{}," \t=]/
-syn region bibComment start=/^/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry
+syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry
 syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents
 syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents
 syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents
@@ -60,6 +59,7 @@
 else
   syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment
 endif
+syn region bibComment2 start=/@Comment[{(]/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry
 
 " Synchronization
 " ===============
@@ -86,6 +86,7 @@
   HiLink bibVariable	Constant
   HiLink bibUnescapedSpecial	Error
   HiLink bibComment	Comment
+  HiLink bibComment2	Comment
   delcommand HiLink
 endif
 
diff --git a/src/edit.c b/src/edit.c
index fe130e6..96ebe71 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -136,6 +136,7 @@
 static void start_arrow __ARGS((pos_T *end_insert_pos));
 #ifdef FEAT_SYN_HL
 static void check_spell_redraw __ARGS((void));
+static void spell_back_to_badword __ARGS((void));
 #endif
 static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
 static int  echeck_abbr __ARGS((int));
@@ -2365,6 +2366,9 @@
 	    case 's':
 	    case Ctrl_S:
 		ctrl_x_mode = CTRL_X_SPELL;
+#ifdef FEAT_SYN_HL
+		spell_back_to_badword();
+#endif
 		break;
 	    case Ctrl_RSB:
 		ctrl_x_mode = CTRL_X_TAGS;
@@ -3533,7 +3537,7 @@
 	{
 #ifdef FEAT_SYN_HL
 	    compl_col = spell_word_start(startcol);
-	    if (compl_col == startcol)
+	    if (compl_col == (colnr_T)startcol)
 		return FAIL;
 	    compl_length = (int)curs_col - compl_col;
 	    compl_pattern = vim_strnsave(line + compl_col, compl_length);
@@ -4759,7 +4763,7 @@
 
 /*
  * start_arrow() is called when an arrow key is used in insert mode.
- * It resembles hitting the <ESC> key.
+ * For undo/redo it resembles hitting the <ESC> key.
  */
     static void
 start_arrow(end_insert_pos)
@@ -4792,6 +4796,20 @@
 	redrawWinline(lnum, FALSE);
     }
 }
+
+/*
+ * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly
+ * spelled word, if there is one.
+ */
+    static void
+spell_back_to_badword()
+{
+    pos_T	tpos = curwin->w_cursor;
+
+    spell_move_to(BACKWARD, TRUE, TRUE);
+    if (curwin->w_cursor.col != tpos.col)
+	start_arrow(&tpos);
+}
 #endif
 
 /*
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 52104f4..529baf7 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -30,7 +30,6 @@
 #ifdef FEAT_AUTOCMD
 static void delbuf_msg __ARGS((char_u *name));
 #endif
-static int do_sub_msg __ARGS((int count_only));
 static int
 #ifdef __BORLANDC__
     _RTLENTRYF
@@ -3940,13 +3939,6 @@
 static char_u	*old_sub = NULL;	/* previous substitute pattern */
 static int	global_need_beginline;	/* call beginline() after ":g" */
 
-/*
- * When ":global" is used to number of substitutions and changed lines is
- * accumulated until it's finished.
- */
-static long	sub_nsubs;	/* total number of substitutions */
-static linenr_T	sub_nlines;	/* total number of lines changed */
-
 /* do_sub()
  *
  * Perform a substitution from line eap->line1 to line eap->line2 using the
@@ -4829,7 +4821,7 @@
  * Can also be used after a ":global" command.
  * Return TRUE if a message was given.
  */
-    static int
+    int
 do_sub_msg(count_only)
     int	    count_only;		/* used 'n' flag for ":s" */
 {
diff --git a/src/globals.h b/src/globals.h
index 60eff1f..6bfc13d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1057,6 +1057,14 @@
 
 EXTERN char_u no_lines_msg[]	INIT(= N_("--No lines in buffer--"));
 
+/*
+ * When ":global" is used to number of substitutions and changed lines is
+ * accumulated until it's finished.
+ * Also used for ":spellrepall".
+ */
+EXTERN long	sub_nsubs;	/* total number of substitutions */
+EXTERN linenr_T	sub_nlines;	/* total number of lines changed */
+
 /* table to store parsed 'wildmode' */
 EXTERN char_u	wim_flags[4];
 
diff --git a/src/option.c b/src/option.c
index 67bcf5e..9b0e636 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1506,6 +1506,15 @@
     {"mesg",	    NULL,   P_BOOL|P_VI_DEF,
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)FALSE, (char_u *)0L}},
+    {"mkspellmem",  "msm",  P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
+#ifdef FEAT_SYN_HL
+			    (char_u *)&p_msm, PV_NONE,
+			    {(char_u *)"460000,2000,500", (char_u *)0L}
+#else
+			    (char_u *)NULL, PV_NONE,
+			    {(char_u *)0L, (char_u *)0L}
+#endif
+    },
     {"modeline",    "ml",   P_BOOL|P_VIM,
 			    (char_u *)&p_ml, PV_ML,
 			    {(char_u *)FALSE, (char_u *)TRUE}},
@@ -4621,6 +4630,7 @@
     (void)opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE);
 #endif
 #ifdef FEAT_SYN_HL
+    (void)spell_check_msm();
     (void)spell_check_sps();
     (void)compile_cap_prog(curbuf);
 #endif
@@ -5791,6 +5801,12 @@
 	if (spell_check_sps() != OK)
 	    errmsg = e_invarg;
     }
+    /* 'mkspellmem' */
+    else if (varp == &p_msm)
+    {
+	if (spell_check_msm() != OK)
+	    errmsg = e_invarg;
+    }
 #endif
 
 #ifdef FEAT_QUICKFIX
diff --git a/src/option.h b/src/option.h
index 9aa2aaa..3cfdd4f 100644
--- a/src/option.h
+++ b/src/option.h
@@ -594,6 +594,9 @@
 #ifdef FEAT_MENU
 EXTERN long	p_mis;		/* 'menuitems' */
 #endif
+#ifdef FEAT_SYN_HL
+EXTERN char_u	*p_msm;		/* 'mkspellmem' */
+#endif
 EXTERN long	p_mls;		/* 'modelines' */
 EXTERN char_u	*p_mouse;	/* 'mouse' */
 #ifdef FEAT_GUI
diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro
index 6404cc8..87af03a 100644
--- a/src/proto/ex_cmds.pro
+++ b/src/proto/ex_cmds.pro
@@ -34,6 +34,7 @@
 int check_restricted __ARGS((void));
 int check_secure __ARGS((void));
 void do_sub __ARGS((exarg_T *eap));
+int do_sub_msg __ARGS((int count_only));
 void ex_global __ARGS((exarg_T *eap));
 void global_exe __ARGS((char_u *cmd));
 int read_viminfo_sub_string __ARGS((vir_T *virp, int force));
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index 2123440..46ac575 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -11,6 +11,7 @@
 void spell_add_word __ARGS((char_u *word, int len, int bad, int index));
 void init_spell_chartab __ARGS((void));
 int spell_check_sps __ARGS((void));
+int spell_check_msm __ARGS((void));
 void spell_suggest __ARGS((void));
 void ex_spellrepall __ARGS((exarg_T *eap));
 void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount, int need_cap));
diff --git a/src/version.h b/src/version.h
index 94726c6..7a32845 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 Aug 16)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 16, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 19)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 19, compiled "