Commits

vimboss  committed 404aac5

updated for version 7.0017

  • Participants
  • Parent commits 8cde1a0
  • Tags v7-0017

Comments (0)

Files changed (52)

File runtime/doc/autocmd.txt

-*autocmd.txt*   For Vim version 7.0aa.  Last change: 2004 Aug 30
+*autocmd.txt*   For Vim version 7.0aa.  Last change: 2004 Sep 17
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
 				should not be changed.  |Cmd-event|
 							*FileWritePre*
 FileWritePre			Before writing to a file, when not writing the
-				whole buffer.
+				whole buffer.  Use the '[ and '] marks for the
+				range of lines.
 							*FileWritePost*
 FileWritePost			After writing to a file, when not writing the
 				whole buffer.
 							*FileWriteCmd*
 FileWriteCmd			Before writing to a file, when not writing the
 				whole buffer.  Should do the writing to the
-				file.  Should not change the buffer.
+				file.  Should not change the buffer.  Use the
+				'[ and '] marks for the range of lines.
 				|Cmd-event|
 							*FileAppendPre*
-FileAppendPre			Before appending to a file.
+FileAppendPre			Before appending to a file.  Use the '[ and ']
+				marks for the range of lines.
 							*FileAppendPost*
 FileAppendPost			After appending to a file.
 							*FileAppendCmd*
 FileAppendCmd			Before appending to a file.  Should do the
-				appending to the file. |Cmd-event|
+				appending to the file.  Use the '[ and ']
+				marks for the range of lines.|Cmd-event|
 							*FilterWritePre*
 FilterWritePre			Before writing a file for a filter command or
 				making a diff.
   the new lines will be inserted.
 - Before the *ReadPost event the '[ mark is set to the first line that was
   just read, the '] mark to the last line.
-- Before executing the *WritePre and *AppendPre autocommands the '[ mark is
-  set to the first line that will be written, the '] mark to the last line.
+- Before executing the *WriteCmd, *WritePre and *AppendPre autocommands the '[
+  mark is set to the first line that will be written, the '] mark to the last
+  line.
 Careful: '[ and '] change when using commands that change the buffer.
 
 In commands which expect a file name, you can use "<afile>" for the file name

File runtime/doc/change.txt

-*change.txt*    For Vim version 7.0aa.  Last change: 2004 Jun 16
+*change.txt*    For Vim version 7.0aa.  Last change: 2004 Sep 16
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
       \0	  replaced with the whole matched pattern	   *\0* *s/\0*
       \1	  replaced with the matched pattern in the first
 		  pair of ()					     *s/\1*
-      \2	  replaced with the matched pattern in the first
+      \2	  replaced with the matched pattern in the second
 		  pair of ()					     *s/\2*
       ..	  ..						     *s/\3*
       \9	  replaced with the matched pattern in the ninth

File runtime/doc/digraph.txt

-*digraph.txt*   For Vim version 7.0aa.  Last change: 2001 Sep 03
+*digraph.txt*   For Vim version 7.0aa.  Last change: 2004 Oct 07
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
 							*E104* *E39*
 :dig[raphs] {char1}{char2} {number} ...
 			Add digraph {char1}{char2} to the list.  {number} is
-			the decimal representation of the character.
+			the decimal representation of the character.  Normally
+			it is the Unicode character, see |digraph-encoding|.
 			Example: >
 	:digr e: 235 a: 228
 <			Avoid defining a digraph with '_' (underscore) as the
 if you look at it on a system that does not support digraphs or if you print
 this file.
 
-The decimal number is the number of the character.
+							*digraph-encoding*
+The decimal number normally is the Unicode number of the character.  Note that
+the meaning doesn't change when 'encoding' changes.  The character will be
+converted from Unicode to 'encoding' when needed.  This does require the
+conversion to be available, it might fail.
+
+When Vim was compiled without the +multi_byte feature, you need to specify the
+character in the encoding given with 'encoding'.  You might want to use
+something like this: >
+
+	if has("multi_byte")
+		digraph oe 339
+	elseif &encoding == "iso-8859-15"
+		digraph oe 189
+	endif
+
+This defines the "oe" digraph for a character that is number 339 in Unicode
+and 189 in latin9 (iso-8859-15).
 
 ==============================================================================
 2. Using digraphs					*digraphs-use*
 These are the RFC1345 digraphs for the one-byte characters.  See the output of
 ":digraphs" for the others.  The characters above 255 are only available when
 Vim was compiled with the |+multi_byte| feature.
+
+Exception: RFC1345 doesn't specify the euro sign.  In Vim the digraph =e was
+added for this.
 							*digraph-table*
 char  digraph	hex	dec	official name ~
 ^@	NU	0x00	  0	NULL (NUL)

File runtime/doc/eval.txt

-*eval.txt*      For Vim version 7.0aa.  Last change: 2004 Sep 13
+*eval.txt*      For Vim version 7.0aa.  Last change: 2004 Oct 06
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
 |expr8|	expr9[expr1]		index in String
 
 |expr9|	number			number constant
-	"string"		string constant
-	'string'		literal string constant
+	"string"		string constant, backslash is special
+	'string'		string constant
 	&option			option value
 	(expr1)			nested expression
 	variable		internal variable
 
 literal-string						*literal-string* *E115*
 ---------------
-'string'		literal string constant		*expr-'*
+'string'		string constant			*expr-'*
 
 Note that single quotes are used.
 
-This string is taken literally.  No backslashes are removed or have a special
-meaning.  A literal-string cannot contain a single quote.  Use a normal string
-for that.
+This string is taken as it is.  No backslashes are removed or have a special
+meaning.  A literal-string cannot contain a single quote.  Use a normal,
+double-quoted string for that.
+
+Single quoted strings are useful for patterns, so that backslashes do not need
+to be doubled.  These two commands are equivalent: >
+	if a =~ "\\s*"
+	if a =~ '\s*'
 
 
 option						*expr-option* *E112* *E113*

File runtime/doc/if_mzsch.txt

 this again for every buffer.
 
 The auto-instantiation can be achieved with autocommands, e.g. you can put
-something like this in your .vimrc: >
-    au VimEnter,BufNew,BufNewFile,BufAdd,BufReadPre *
-	\:mz (require (prefix vim- vimext)
+something like this in your .vimrc (EOFs should not have indentation): >
+    function s:MzRequire()
+	if has("mzscheme")
+	    :mz << EOF
+	    (require (prefix vim- vimext))
+	    (let ((buf (vim-get-buff-by-name (vim-eval "expand(\"<afile>\")"))))
+	      (when (and buf (not (eq? buf (vim-curr-buff))))
+		(parameterize ((current-namespace (vim-get-buff-namespace buf)))
+		  (namespace-attach-module vim-global-namespace 'vimext)
+		  (namespace-require '(prefix vim vimext)))))
+    EOF
+	endif
+    endfunction
+
+    function s:MzStartup()
+	if has("mzscheme")
+	    au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire()
+	    :mz << EOF
+	    (current-library-collection-paths
+		(cons
+		    (build-path (find-system-path 'addon-dir) (version) "collects")
+		    (current-library-collection-paths)))
+    EOF
+	endif
+    endfunction
+
+    call s:MzStartup()
 <
 
 The global namespace just instantiated this module with the prefix "vimext:".

File runtime/doc/options.txt

-*options.txt*	For Vim version 7.0aa.  Last change: 2004 Sep 04
+*options.txt*	For Vim version 7.0aa.  Last change: 2004 Oct 07
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
 	prefer using ".bak", but make sure that you don't have files with
 	".bak" that you want to keep.
 
+	If you like to keep a lot of backups, you could use a BufWritePre
+	autocommand to change 'backupext' just before writing the file to
+	include a timestamp. >
+		:au BufWritePre * let &bex = '-' . strftime("%Y%b%d%X") . '~'
+<	Use 'backupdir' to put the backup in a different directory.
+
 						*'backupskip'* *'bsk'*
 'backupskip' 'bsk'	string	(default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
 			global

File runtime/doc/pi_netrw.txt

-*pi_netrw.txt  For Vim version 6.2.  Last change: Sep 10, 2004
+*pi_netrw.txt  For Vim version 6.2.  Last change: Sep 13, 2004
 
 
 		VIM REFERENCE MANUAL    by Charles E. Campbell, Jr.
 					"directories" and "files" in the
 					listing.  This pattern is used to
 					remove such embedded messages.
-	g:netrw_keepdir			keep current directory immune from the
-					browsing directory.  The browsing
-					directory is contained in b:netrw_curdir
+	g:netrw_keepdir			=1 (default) keep current directory
+					immune from the browsing directory.
+					=0 keep the current directory the
+					same as the browsing directory.
+					The browsing directory is contained in
+					b:netrw_curdir
 	g:netrw_list_cmd		command for listing remote directories
+	g:netrw_longlist		if =1, then long listing will be default
 	g:netrw_ftp_list_cmd		options for passing along to ftp for
 					directory listing.  Defaults:
 					 unix or g:netrw_cygwin set: : "ls -lF"
 	g:netrw_local_rmdir		remove directory command (rmdir)
 	g:netrw_local_rename		rename file/directory command
 					unix-default: rm    win32-default: ren
+	g:netrw_maxfilenamelen		=32 by default, selected so as to make
+					long listings fit on 80 column displays.
+					If your screen is wider, and you have
+					file/directory names longer than 32 bytes,
+					you may set this option to keep listings
+					columnar.
 	g:netrw_mkdir_cmd		command for making a remote directory
 	g:netrw_rm_cmd			command for removing files
 	g:netrw_rmdir_cmd		command for removing directories
 file with mozilla.
 
 
-MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY		*netrw-c*
+MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY	*netrw-c* *netrw-curdir*
 
-By default, g:netrw_keepdir is 0.  This setting means that the current
-directory will track the browsing directory.  However, setting g:netrw_keepdir
-to 1 (say, in your <.vimrc>) will keep the current directory independent
-of the browsing directory.  In that case, in order to make the two
-directories the same, use the "c" map (just type c).
+By default, g:netrw_keepdir is 1.  This setting means that the current
+directory will not track the browsing directory.  However, setting
+g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
+currently browsed directory be the current directory.
 
+With the default setting for g:netrw_keepdir, in order to make the two
+directories the same, use the "c" map (just type c).  That map will set
+the current directory to the current browsing directory.
 
-BOOKMARKING A DIRECTORY						*netrw-b*
+
+BOOKMARKING A DIRECTORY		*netrw-b* *netrw-bookmark* *netrw-bookmarks*
 
 One may easily "bookmark" a directory by using
 
 	{cnt}b
 
-Any count may be used.
+Any count may be used.  One may use viminfo's "!" option to retain bookmarks
+between vim sessions.
 
 
 CHANGING TO A BOOKMARKED DIRECTORY				*netrw-B*
 
 	P4. I would like long listings to be the default.
 
-		let g:netrw_longlist=1
+			let g:netrw_longlist=1
+
+		Check out |netrw-browse-var| for more customizations that
+		you can set.
 
 	P5. My times come up oddly in local browsing
 
 		your <.vimrc>:
 			let g:netrw_timefmt= "%X"  (where X is the option)
 
-	P6. I don't want my current directory changing just because I'm
-	    browsing somewhere.
+	P6. I want my current directory to track my browsing.
+	    How do I do that?
 
-	    	let g:netrw_keepdir= 1
+	    	let g:netrw_keepdir= 0
 	
 
 ==============================================================================
 ==============================================================================
 10. History						*netrw-history*
 
-	v48: * One may use ftp to do remote host file browsing
+	v50: * directories now displayed using buftype=nofile; should keep the
+	       directory names as-is
+	     * attempts to remove empty "[No File]" buffers leftover
+	       from :file ..name.. commands
+	     * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
+	     * syntax highlighting for "Showing:" the hiding list included
+	     * bookmarks can now be retained if "!" is in the viminfo option
+	v49: * will use ftp for http://.../ browsing v48: * One may use ftp to
+	       do remote host file browsing
 	     * (windows and !cygwin) remote browsing with ftp can now use
 	       the "dir" command internally to provide listings
 	     * g:netrw_keepdir now allows one to keep the initial current
-	       directory as the current directory (normally the local
-	       file browser makes the currently viewed directory the
-	       current directory)
+	       directory as the current directory (normally the local file
+	       browser makes the currently viewed directory the current
+	       directory)
 	     * g:netrw_alto and g:netrw_altv now support alternate placement
 	       of windows started with o or v
 	     * Nread ? and Nwrite ?  now uses echomsg (instead of echo) so
 	       :messages can repeat showing the help
 	     * bugfix: avoids problems with partial matches of directory names
 	       to prior buffers with longer names
-	     * one can suppress error messages with g:netrw_quiet
-	     * ctrl-h used instead of <Leader>h for editing hiding list
-	     * one may edit the sorting sequence with the S map
-	     * now allows confirmation of deletion with [y(es) n(o) a(ll) q(uit)]
-	     * the "x" map now handles special file viewing with:
-	       (windows) rundll32 url.dll
-	       (gnome)   gnome-open
-	       (kde)     kfmclient
-	       If none of these are on the executable path, then
+	     * one can suppress error messages with g:netrw_quiet ctrl-h used
+	     * instead of <Leader>h for editing hiding list one may edit the
+	     * sorting sequence with the S map now allows confirmation of
+	     * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
+	     * special file viewing with:
+	       (windows) rundll32 url.dll (gnome)   gnome-open (kde)
+	       kfmclient If none of these are on the executable path, then
 	       NetrwFileHandlers.vim is used.
 	     * directory bookmarking during both local and remote browsing
 	       implemented
 	     * one may view all, use the hiding list to suppress, or use the
-	       hiding list to show-only remote and local file/directory listings
-	     * improved unusual file and directory name handling
-	     * preview window support
-	v47: * now handles local directory browsing.
-	v46: * now handles remote directory browsing
+	       hiding list to show-only remote and local file/directory
+	       listings
+	     * improved unusual file and directory name handling preview
+	     * window support
+	v47: * now handles local directory browsing.  v46: * now handles
+	remote directory browsing
 	     * g:netrw_silent (if 1) will cause all transfers to be silent'd
-	v45: * made the [user@]hostname:path form a bit more restrictive
-	       to better handle errors in using protocols
-	       (e.g. scp:usr@host:file was being recognized as an rcp request)
-	v44: * changed from "rsync -a" to just "rsync"
+	v45: * made the [user@]hostname:path form a bit more restrictive to
+	       better handle errors in using protocols (e.g. scp:usr@host:file
+	       was being recognized as an rcp request) v44: * changed from
+	       "rsync -a" to just "rsync"
 	     * somehow an editing error messed up the test to recognize
 	       use of the fetch method for NetRead.
 	     * more debugging statements included
-	v43: * moved "Explanation" comments to <pi_netrw.txt> help file
-	       as "Network Reference" (|netrw-ref|)
+	v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
+	       "Network Reference" (|netrw-ref|)
 	     * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
 	     * removed superfluous NetRestorePosn() calls
-	v42: * now does BufReadPre and BufReadPost events on file:///*
-	       and file://localhost/*
-	v41: * installed file:///* and file://localhost/* handling
-	v40: * prevents redraw when a protocol error occurs so that the
-	       user may see it
-	v39: * sftp support
-	v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands
+	v42: * now does BufReadPre and BufReadPost events on file:///* and
+	       file://localhost/* v41: * installed file:///* and
+	       file://localhost/* handling v40: * prevents redraw when a
+	       protocol error occurs so that the user may see it v39: * sftp
+	       support v38: * Now uses NetRestorePosn() calls with
+	       Nread/Nwrite commands
 	     * Temporary files now removed via bwipe! instead of bwipe
-	       (thanks to Dave Roberts)
-	v37: * Claar's modifications which test if ftp is successful, otherwise
-	       give an error message
+	       (thanks to Dave Roberts) v37: * Claar's modifications which
+	       test if ftp is successful, otherwise give an error message
 	     * After a read, the alternate file was pointing to the temp file.
 	       The temp file buffer is now wiped out.
 	     * removed silent from transfer methods so user can see what's

File runtime/doc/syntax.txt

-*syntax.txt*	For Vim version 7.0aa.  Last change: 2004 Sep 13
+*syntax.txt*	For Vim version 7.0aa.  Last change: 2004 Sep 18
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
 
 	:let perl_no_extended_vars = 1
 
-{In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.)
+(In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.)
 
 The coloring strings can be changed. By default strings and qq friends will be
 highlighted like the first line. If you set the variable

File runtime/doc/tags

 E676	options.txt	/*E676*
 E677	eval.txt	/*E677*
 E678	pattern.txt	/*E678*
+E679	syntax.txt	/*E679*
 E68	pattern.txt	/*E68*
 E69	pattern.txt	/*E69*
 E70	pattern.txt	/*E70*
 diff-patchexpr	diff.txt	/*diff-patchexpr*
 diff.txt	diff.txt	/*diff.txt*
 digraph-arg	change.txt	/*digraph-arg*
+digraph-encoding	digraph.txt	/*digraph-encoding*
 digraph-table	digraph.txt	/*digraph-table*
 digraph.txt	digraph.txt	/*digraph.txt*
 digraphs	digraph.txt	/*digraphs*
 hebrew.txt	hebrew.txt	/*hebrew.txt*
 help	various.txt	/*help*
 help-context	help.txt	/*help-context*
-help-tags	tags	1
 help-translated	various.txt	/*help-translated*
 help-xterm-window	various.txt	/*help-xterm-window*
 help.txt	help.txt	/*help.txt*
 netrw-S	pi_netrw.txt	/*netrw-S*
 netrw-activate	pi_netrw.txt	/*netrw-activate*
 netrw-b	pi_netrw.txt	/*netrw-b*
+netrw-bookmark	pi_netrw.txt	/*netrw-bookmark*
+netrw-bookmarks	pi_netrw.txt	/*netrw-bookmarks*
 netrw-browse	pi_netrw.txt	/*netrw-browse*
 netrw-browse-cmds	pi_netrw.txt	/*netrw-browse-cmds*
 netrw-browse-var	pi_netrw.txt	/*netrw-browse-var*
 netrw-cr	pi_netrw.txt	/*netrw-cr*
 netrw-credits	pi_netrw.txt	/*netrw-credits*
 netrw-ctrl-l	pi_netrw.txt	/*netrw-ctrl-l*
+netrw-curdir	pi_netrw.txt	/*netrw-curdir*
 netrw-d	pi_netrw.txt	/*netrw-d*
 netrw-debug	pi_netrw.txt	/*netrw-debug*
 netrw-delete	pi_netrw.txt	/*netrw-delete*

File runtime/doc/todo.txt

-*todo.txt*      For Vim version 7.0aa.  Last change: 2004 Sep 13
+*todo.txt*      For Vim version 7.0aa.  Last change: 2004 Oct 07
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-Endless loop when "syntax reset" in ~/.vim/after/syntax/syncolor.vim.
-Crash when using ":set background=dark".  Solved!
-Limit init_highlight() to five recursive calls?
-    patch for Vim 6.3 for free_oldval and init_highlight()?
+Add browsedir(): like browse() but for directories.
+    For GTK it already sort-of works when the default name is empty.
 
-Crash with long line. (Walter Briscoe, Sep 13)
+When ":file" sets the alternate file name and it's empty this doesn't make
+sense.  Could skip it, but would that break scripts that rely on the buffer to
+exist?
 
-Add fix for appending BOM to 6.3?  Reported by Alex Jakushev.
-
-Win32 console doesn't compile.  Does GetCommandLineW() work for non-GUI?
-(Dave Roberts)  If yes, then move the functions to another file.
-link with kernel32.lib?
+Folding support for 2html. (Carl Osterwisch, Oct 4)
+How to evaluate an expression in the sandbox?
 
 Aborting at the ATTENTION prompt causes trouble:
     buffer remains active, nwindows isn't closed (fixed in buffer.c)
 work. (Valery Kondakoff)
 Solved in os_mswin.c.  Add to 6.3?
 
+Patch for Win32 textdomain: NAKADAIRA Yukihiro, Sept 17.
+
+GTK 2 error message with this sequence (Namsh Oct 7):
+	- start gvim with French locale
+	- set enc=utf-8
+	- :aunmenu *
+	- :unlet  did_install_default_menus
+	- :source $VIMRUNTIME/menu.vim
+
 Valencia: executable("xxd.exe") returns true while "!xxd" doesn't work.
+Works fine for me.  Only in specific environment?
+
+netrw plugin: When coming back to the same directory a scratch buffer appears.
+Only on Win32. (Charles Campbell, Sept 15)
+
+New Eiffel indent script from Jocelyn Fiat.  OK with David Clarke.
+
+Win32: not using 'tenc' in GUI causes problems on Win 98?  (Jiri Jezdinsky)
+Try out with Russian input method.
+
+After "Y" '[ and '] are not at start/end of the yanked text. (Ken Clark)
+
+Patch for adding 'fsync' option: disable using fsync() on file write. (Sept.
+26, Ciaran McCreesh)
+
+Folding for C syntax: (Olaf Dabrunz 27 sept 2004)
+
+Add remark about using Vim with VS .net to Visvim docs. (David Fishburn, Sept
+27)
+
+Vim icon for documents associated with Vim? (Rahul Kulkarni, sept 28)
+
+Add a function to test if a font name actually works.
+
+When using "set laststatus=2 cmdheight=2" in the .gvimrc you only get one line
+for the cmdline. (Christian Robinson)  When the Vim window is resized (e.g.,
+xterm with many lines) it's OK.
+
 
 For version 7.0:
 
     7   For Visual mode: Command to do a search for the string in the marked
 	area.  Only when fewer than two lines. Use "g/" and "gb".  Patch from
 	Yegappan Lakshmanan. 2004 Jul 11
+	When more than two lines: perform a search in the Visual area only.
     8   Make 'statusline' local, so that each window can have a different
 	value.  But should it also be local to a buffer? (Yegappan Lakshmanan
 	has a patch, 2004 Jul 11)
     -   findmatch() should be adjusted for Lisp.  See remark at
 	get_lisp_indent().  Esp. \( and \) should be skipped. (Dorai Sitaram,
 	incomplete patch Mar 18)
+    -	Set user variables to the names of the actually used user vimrc file,
+	the first directory looked for user plugins/syntax files.
+	$MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for
+	runtime files?
+	Also: when the environment variable exists, use it.  If it doesn't
+	exist, set it.  Requires good names: $VIM_USER_VIMRC  $VIM_USER_DIR
 
 
 -   In the kvim/KDE source files fix the formatting.
 	  the contains list directly for matching syntax items.
         - Keep wordlist in syntax group, load it only once and use it several
 	  times later.  Sort of global syntax items.
+	- Use wordlists from openoffice (myspell).  Work together with them to
+	  update the wordlist.  (Adri Verhoef, Aad Nales)
 -   REFACTORING: The main() function is very long.  Move parts to separate
     functions, especially loops.  Ideas from Walter Briscoe (2003 Apr 3, 2004
     Feb 9).
 	http://sourceforge.net/projects/insenvim
 	http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
 	Ivan Villanueva has something for Java.
+    Can't call it Intellisense, it is a trademark by Microsoft.
+    Ideas from the Vim 7 BOF at SANE:
+    - It's not possible to have one solution for all languages.  Design an
+      interface for completion plugins.  The matches can be done in a
+      Vim-script list.
+    - For interpreted languages, use the interpreter to obtain information.
+      Should work for Java (Eclipse does this), Python, Tcl, etc.
+    - Check Readline for its completion interface.
+    - Use ctags for other languages.  Writing a file could trigger running
+      ctags, merging the tags of the changed file.
+-   UNDO TREE: keep all states of the text, don't delete undo info.
+    When making a change, instead of clearing any future undo (thus redo)
+    info, make a new branch.
+    To navigate through the undo tree number the states of the text
+    sequentially and make it possible to go through the tree in that order.
+    Could also use timestamps (to show the time and/or jump to a state five
+    minutes ago). (David Schweikert)
+    To go from one state to another: backtrack to a common state, then forward
+    again.
+    Only difficult thing: When going back in time, how to find the previous
+    text state in the tree?
+    Show the list of changes in a window to be able to select a version?
 -   PERSISTENT UNDO: store undo in a file.
-    Support multiple threads.  Show the list of changes in a window to be able
-    to select a version.
+    Use timestamps, so that a version a certain time ago can be found and info
+    before some time/date can be flushed. 'undopersist' gives maximum time to
+    keep undo: "3h", "1d", "2w", "1y", etc.  For the file use dot and
+    extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
 7   SWAP FILE CHANGE: When a dos format file was edited with ":e ++ff=unix",
     Vim is killed and trying to recover the file, 'ff' will be dos.  Same for
     non-default fileencoding.  (Miroslaw Dobrzanski-Neumann, Jul 17)
 -   STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
     Especially when using the scrollbar.  Typing a cursor-movement command
     scrolls back to where the cursor is.
+-   Execute a function with standard option values.  No need to save and
+    restore option values.  Especially useful for new options.  Problem: how
+    to avoid a performance penalty (esp. for string options)?
 8   Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
     Add the 'maxcombining' option to set the nr. of composing characters.
+    At the same time support more colors (use two bytes when necessary).
 -   Add a few more things to 'diffopt': "horizontal", "vertical",
     "foldcolumn". (Benji Fisher, 2004 Jun 21)
 -   FileChangedShellPost autocommand event: after (not) reloading a changed
 -   "onemore" flag in 'virtualedit': move cursor past end of line.  Patch by
     Mattias Flodin (2004 Jul 30)
 
+The fsync() in buf_write() causes laptop harddisk spinup.  Add an option to
+avoid it?
+
 Support ":set syntax=cpp.doxygen"?  Suggested patch by Michael Geddes (9 Aug
 2004).  Should also work for 'filetype'.
 
 Win32: In 'fileencodings' allow using "acp" for the active codepage.  Useful
 value: "ucs-bom,utf-8,acp,latin1"
 
+Win32: Cannot edit a file starting with # with --remote. (Giuseppe Bilotta,
+Oct 6 2004)
+
 For manipulating buffers without opening a new window, support Virtual
 windows.  Example:
     :virtwin let l = GetBufLine(4, 10)
 Mathias Michaelis (2004 Sep 6)
 Also place vimtutor.bat in %windir%?
 
+Support ":enew filename" to edit a new buffer with a name.  It's like "enew |
+file filename" but without setting the alternate file to a buffer without a
+name. (Charles Campbell)
+
 
 Vi incompatibility:
 9   In Ex mode, "u" undoes all changes, not just the last one. (John Cowan)
 
 KDE GUI known bugs:
 -   The default font is ugly.  bold text isn't displayed correctly.
+    (bold characters are half the width of normal characters)
 -   Error messages when starting up.  The "tip of the day" box is empty.
 -   Encoding of menu items needs to be converted. (Yasuhiro Matsumoto)
 
     *Leave	    - Leaving a mode (in pair with the above *Enter)
     VimLeaveCheck    - Before Vim decides to exit, so that it can be cancelled
 		      when exiting isn't a good idea.
+    WinMoved	    - when windows have been moved around, e.g, ":wincmd J"
     CmdUndefined    - Like FuncUndefined but for user commands.
     SearchPost	    - After doing a search command (e.g. to do "M")
     PreDirChanged/PostDirChanged
 -   Add command to repeat a whole mapping ("." only repeats the last change in
     a mapping).  Also: Repeat a whole insert command, including any mappings
     that it included.  Sort-of automatic recording?
--   Make it possible to undo all the commands from a mapping, including a
-    trailing unfinished command, e.g. for ":map K iX^[r".
 -   Add an option to ":map" that makes it display the special keys in
     <> notation (e.g. <CR> instead of ^M).  Or just always do this?
 -   Include an option (or flag to 'cpoptions') that makes errors in mappings
 
 
 Undo:
+-   Make it possible to undo all the commands from a mapping, including a
+    trailing unfinished command, e.g. for ":map K iX^[r".
 -   When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not
     possible, even when typing <Esc> immediately. (Grahn)  Also for "i", "a",
     etc.  Postpone saving for undo until something is really inserted?
     version without changing the rest of the file.  Stop doing this when a
     change includes only some of these lines and changes the line count.  Need
     to store these undo actions as a separate change that can be undone.
-7   Add an undo tree: When making a change, instead of clearing any future
-    undo (thus redo) info, make a new branch.  How to navigate through the
-    undo tree?
 -   For u_save() include the column number. This can be used to set '[ and '].
     And in the future the undo can be made more efficient (Webb).
 -   In out-of-memory situations: Free allocated space in undo, and reduce the
     below/above).
 -   Use digraph table to tell Vim about the collating sequence of special
     characters?
-8   Add command to remove (all) digraphs. (Brown)
+8   Add command to remove one or more (all) digraphs. (Brown)
 7   Support different sets of digraphs (depending on the character set?).  At
     least Latin1/Unicode, Latin-2, MS-DOS (esp. for Win32).
 

File runtime/doc/usr_41.txt

-*usr_41.txt*	For Vim version 7.0aa.  Last change: 2004 Aug 28
+*usr_41.txt*	For Vim version 7.0aa.  Last change: 2004 Oct 06
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
 	:echo name
 <	"peter" ~
 
-Inside a single-quote string all the characters are taken literally.  The
-drawback is that it's impossible to include a single quote.  A backslash is
-taken literally as well, thus you can't use it to change the meaning of the
+Inside a single-quote string all the characters are as they are.  The drawback
+is that it's impossible to include a single quote.  A backslash is taken
+literally as well, thus you can't use it to change the meaning of the
 character after it.
    In double-quote strings it is possible to use special characters.  Here are
 a few useful ones:

File runtime/doc/version7.txt

-*version7.txt*  For Vim version 7.0aa.  Last change: 2004 Sep 13
+*version7.txt*  For Vim version 7.0aa.  Last change: 2004 Oct 07
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
 For the '%' item in 'viminfo', allow a number to set a maximum for the number
 of buffers.
 
+When a file looks like a shell script, check for an "exec" command that starts
+the tcl interpreter. (suggested by Alexios Zavras)
+
+Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that
+digraphs still work when iconv is not available.
+
 ==============================================================================
 COMPILE TIME CHANGES					*compile-changes-7*
 
 xterm reports the number of colors), the hit-enter prompt overwrote the last
 line.  Don't reset msg_didout in normal_cmd() for K_IGNORE.
 
+Mac GUI: Shift-Tab didn't work.
+
+When defining tooltip text, don't translate terminal codes, since it's not
+going to be used like a command.
+
+GTK 2: Check the tooltip text for valid utf-8 characters to avoid getting a
+GTK error.  Invalid characters may appear when 'encoding' is changed.
+
+GTK 2: Add a safety check for invalid utf-8 sequences, they can crash pango.
+
+Win32: When 'encoding' is changed while starting up, use the Unicode command
+line to convert the file arguments to 'encoding'.  Both for the GUI and the
+console version.
+
+Win32 GUI: latin9 text (iso-8859-15) was not displayed correctly, because
+there is no codepage for latin9.  Do our own conversion from latin9 to UCS2.
+
  vim:tw=78:ts=8:ft=help:norl:

File runtime/filetype.vim

 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2004 Sep 11
+" Last Change:	2004 Oct 02
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
       unlet b:is_bash
     endif
   endif
-  setf sh
+  call SetFileTypeShell("sh")
+endfun
+
+" For shell-like file types, check for an "exec" command hidden in a comment,
+" as used for Tcl.
+fun! SetFileTypeShell(name)
+  let l = 2
+  while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
+    " Skip empty and comment lines.
+    let l = l + 1
+  endwhile
+  if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
+    " Found an "exec" line after a comment with continuation
+    let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '')
+    if n =~ '\<tclsh\|\<wish'
+      setf tcl
+      return
+    endif
+  endif
+  exe "setf " . a:name
 endfun
 
 " tcsh scripts
-au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login	setf tcsh
+au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login	call SetFileTypeShell("tcsh")
 
 " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
 au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias  call SetFileTypeCSH()
 
 fun! SetFileTypeCSH()
   if exists("g:filetype_csh")
-    exe "setf " . g:filetype_csh
+    call SetFileTypeShell(g:filetype_csh)
   elseif &shell =~ "tcsh"
-    setf tcsh
+    call SetFileTypeShell("tcsh")
   else
-    setf csh
+    call SetFileTypeShell("csh")
   endif
 endfun
 

File runtime/indent/eiffel.vim

 " Vim indent file
 " Language:	Eiffel
-" Maintainer:	David Clarke <gadicath@dishevelled.net>
+" Maintainer:	Jocelyn Fiat <eiffel@djoce.net>
+" Previous-Maintainer:	David Clarke <gadicath@dishevelled.net>
 " $Date$
 " $Revision$
-" URL: http://gadicath.webhop.net/other/eiffel.vim
+" URL: http://www.djoce.net/page/vim/
+" Last Change:	2004 Sep 14
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
 setlocal indentkeys+==end,=else,=ensure,=require,=check,=loop,=until
 setlocal indentkeys+==creation,=feature,=inherit,=class,=is,=redefine,=rename,=variant
 setlocal indentkeys+==invariant,=do,=local,=export
-setlocal sw=3
-setlocal tw=78
 
 " Define some stuff
 " keywords grouped by indenting
 
   " set indent of zero end statements that are at an indent of 3, this should
   " only ever be the class's end.
-  if getline(v:lnum) =~ '^\s*end\>' && ind == 3
+  if getline(v:lnum) =~ '^\s*end\>' && ind == &sw
     let ind = 0
   endif
 

File runtime/indent/java.vim

 " Vim indent file
 " Language:	Java
-" Maintainer:	Toby Allsopp <toby.allsopp@peace.com>
-" Last Change:	2003 Oct 21
+" Maintainer:	Toby Allsopp <toby.allsopp@peace.com> (resigned)
+" Last Change:	2004 Oct 05
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")

File runtime/menu.vim

 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2004 May 26
+" Last Change:	2004 Sep 16
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
   endif
   unlet s:n
 endif
-if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_photon")
+if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
   an 20.470 &Edit.Select\ Fo&nt\.\.\.	:set guifont=*<CR>
 endif
 

File runtime/plugin/netrw.vim

 " netrw.vim: Handles file transfer and remote directory listing across a network
-" Last Change:	Sep 10, 2004
+" Last Change:	Sep 14, 2004
 " Maintainer:	Charles E. Campbell, Jr. PhD   <drchipNOSPAM at campbellfamily.biz>
-" Version:	48
+" Version:	51a	NOT RELEASED
 " License:	Vim License  (see vim's :help license)
 "
 "  But be doers of the Word, and not only hearers, deluding your own selves
 if exists("g:loaded_netrw") || &cp
   finish
 endif
-let g:loaded_netrw  = "v48"
+let g:loaded_netrw  = "v51a"
 let s:save_cpo      = &cpo
 let loaded_explorer = 1
 set cpo&vim
  let g:netrw_hide= 1
 endif
 if !exists("g:netrw_ftp_browse_reject")
- let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not'
+ let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
 endif
 if !exists("g:netrw_keepdir")
  let g:netrw_keepdir= 1
 if !exists("g:netrw_altv")
  let g:netrw_altv= 0
 endif
+if !exists("g:netrw_maxfilenamelen")
+ let g:netrw_maxfilenamelen= 32
+endif
 
 " BufEnter event ignored by decho when following variable is true
 "  Has a side effect that doau BufReadPost doesn't work, so
    au BufReadCmd  file:///*		exe "silent doau BufReadPre ".expand("<afile>")|exe 'e /'.substitute(expand("<afile>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<afile>")
    au BufReadCmd  file://localhost/*	exe "silent doau BufReadPre ".expand("<afile>")|exe 'e /'.substitute(expand("<afile>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<afile>")
   endif
-  au BufReadCmd  ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
-  au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread "   .expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
-  au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*    		exe "silent doau BufWritePre ".expand("<afile>")|exe "Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
+  au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
+  au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*	exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread "   .expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>")
+  au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*    	exe "silent doau BufWritePre ".expand("<afile>")|exe "Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
+  au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*    	exe "silent doau BufWritePre ".expand("<afile>")|exe "'[,']Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>")
+"  au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*    	if exists("vcount")|call Decho("vcount=".vcount)|else|call Decho("no vcount")|endif
  augroup END
 endif
 
 "  call Dfunc("NetBrowse(dirname<".a:dirname.">) longlist=".g:netrw_longlist)
 
   " sanity check
-  if exists("b:netrw_method") && b:netrw_method =~ '[23]'
+  if exists("b:netrw_method") && b:netrw_method =~ '[235]'
+"   call Decho("b:netrw_method=".b:netrw_method)
    if !executable("ftp")
     if !exists("g:netrw_quiet")
      echoerr "***netrw*** this system doesn't support remote directory listing via ftp"
 "  call Decho("set up path   <".path   .">")
 "  call Decho("set up fname  <".fname  .">")
 
-  if method == "ftp"
+  if method == "ftp" || method == "http"
+   let method  = "ftp"
    let listcmd = g:netrw_ftp_list_cmd
   else
    let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
   endif
+
   if exists("b:netrw_method")
 "   call Decho("setting s:netrw_method<".b:netrw_method.">")
    let s:netrw_method= b:netrw_method
   endif
 
   " rename file to reflect where its from
-  setlocal ts=32 bt=nofile bh=wipe nobl
+  setlocal bt=nofile bh=wipe nobl noswf
+  exe "setlocal ts=".g:netrw_maxfilenamelen
 "  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 bt=nowrite bh=hide nobl
+  setlocal bh=hide nobl
 
   " set up buffer-local mappings
 "  call Decho("set up buffer-local mappings")
    else
     " strip off a directory name from dirname
     let dirname= substitute(dirname,'^\(.*/\)[^/]\+/','\1','')
-  exe "silent! keepjumps ".curline.",$d"
    endif
 "   call Decho("go up one dir: dirname<".dirname."> trailer<".trailer.">")
 
 
   if a:remote == 1
    let eikeep= &ei
-   set ei=all bh=delete bt=nofile
+   set ei=all bh=delete bt=nofile noswf
    exe "norm! \<c-o>"
    let &ei= eikeep
    redraw!
   exe "silent! keepjumps ".curline.",$d"
 
    ".........................................
-  if s:netrw_method == 2
+  if s:netrw_method == 2 || s:netrw_method == 5
    " ftp + <.netrc>:  Method #2
    if a:path != ""
     put ='cd '.a:path
    endif
    exe "put ='".a:cmd."'"
-
-
-"    redraw!|call inputsave()|call input("Pausing...")|call inputrestore() "Decho
+"    redraw!|call inputsave()|call input("Pausing...")|call inputrestore()
    if exists("g:netrw_port") && g:netrw_port != ""
 "    call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
     exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
 
   if a:chg == 0
    " bookmark the current directory
-   let s:netrw_bookmarkdir_{v:count}= a:curdir
-   if !exists("s:bookmarkmax")
-    let s:bookmarkmax= v:count
-   elseif v:count > s:bookmarkmax
-    let s:bookmarkmax= v:count
+   let g:NETRW_BOOKMARKDIR_{v:count}= a:curdir
+   if !exists("g:NETRW_BOOKMARKMAX")
+    let g:NETRW_BOOKMARKMAX= v:count
+   elseif v:count > g:NETRW_BOOKMARKMAX
+    let g:NETRW_BOOKMARKMAX= v:count
    endif
 
   elseif a:chg == 1
    " change to the bookmarked directory
-   if exists("s:netrw_bookmarkdir_{v:count}")
-    exe "e ".s:netrw_bookmarkdir_{v:count}
+   if exists("g:NETRW_BOOKMARKDIR_{v:count}")
+    exe "e ".g:NETRW_BOOKMARKDIR_{v:count}
    else
     echomsg "Sorry, bookmark#".v:count." doesn't exist!"
    endif
 
-  elseif exists("s:bookmarkmax")
+  elseif exists("g:NETRW_BOOKMARKMAX")
    " list bookmarks
-"   call Decho("list bookmarks [0,".s:bookmarkmax."]")
+"   call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]")
    let cnt= 0
-   while cnt <= s:bookmarkmax
-    if exists("s:netrw_bookmarkdir_{cnt}")
-     echo "Netrw Bookmark#".cnt.": ".s:netrw_bookmarkdir_{cnt}
-"     call Decho("Netrw Bookmark#".cnt.": ".s:netrw_bookmarkdir_{cnt})
+   while cnt <= g:NETRW_BOOKMARKMAX
+    if exists("g:NETRW_BOOKMARKDIR_{cnt}")
+     echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}
+"     call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt})
     endif
     let cnt= cnt + 1
    endwhile
 "  call Dret("NetBookmarkDir")
 endfun
 
-
 " ---------------------------------------------------------------------
 "  Browsing Support For Local Directories And Files:    {{{1
 
     endif
    endif
 "   call Decho("buffer already exists, but needs re-listing (buf#".dirnamenr.")")
+"   call Decho("buffer name<".bufname("%")."> dirname<".dirname.">")
    setlocal ma
    keepjumps %d
-   if expand("%:p") != dirname
+   if expand("%") != dirname
+    " set standard browser options on buffer
+    setlocal bt=nofile bh=hide nobl noswf
+    exe "setlocal ts=".g:netrw_maxfilenamelen
     exe 'silent! file '.escape(dirname,s:netrw_cd_escape)
-"    call Decho("renamed file to<".escape(dirname,' #').">")
+"    call Decho("renamed buffer to<".escape(dirname,s:netrw_cd_escape).">")
+"    call Decho("yielding actual bufname<".bufname("%").">")
    endif
   else
 "   call Decho("generate new buffer named<".escape(dirname,' #').">")
    silent! enew!
+   " set standard browser options on buffer
+   setlocal bt=nofile bh=hide nobl noswf
+   exe "setlocal ts=".g:netrw_maxfilenamelen
    exe 'silent! file '.substitute(escape(dirname,s:netrw_cd_escape),'/$','','e')
-"   call Decho("renamed file to<".escape(dirname,s:netrw_cd_escape).">")
+"   call Decho("renamed buffer to<".substitute(escape(dirname,s:netrw_cd_escape),'/$','','e').">")
+"   call Decho("yielding actual bufname<".bufname("%").">")
   endif
-  " set standard browser options on buffer
-  setlocal ts=32 bt=nowrite bh=hide nobl
+  if bufname("#") == "" && bufnr("#") != -1
+   " the file command produces a lot of [No File] buffers
+"   call Decho("wiping out nofile buffer#".bufnr("#"))
+   exe bufnr("#")."bwipe"
+  endif
 
   " set up all the maps
 "  call Decho("Setting up local browser maps")
   setlocal noma nomod
   if g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
 
-"  call Dret("LocalBrowse : file<".expand("%:p").">")
+"  call Dret("LocalBrowse : file<".expand("%:p")."> bufname<".bufname("%").">")
 endfun
 
 " ---------------------------------------------------------------------
     let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e')
    else
     let file     = filelist
-    let filelist= ""
+    let filelist = ""
    endif
    let pfile= file
    if isdirectory(file)

File runtime/scripts.vim

 " Vim support file to detect file types in scripts
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last change:	2004 Sep 02
+" Last change:	2004 Oct 02
 
 " This file is called by an autocommand for every file that has just been
 " loaded into a buffer.  It checks if the type of file can be recognized by
     " csh scripts
   elseif s:name =~ '^csh\>'
     if exists("g:filetype_csh")
-      let &ft = g:filetype_csh
+      call SetFileTypeShell(g:filetype_csh)
     else
-      set ft=csh
+      call SetFileTypeShell("csh")
     endif
 
     " tcsh scripts
   elseif s:name =~ '^tcsh\>'
-    set ft=tcsh
+    call SetFileTypeShell("tcsh")
 
     " Z shell scripts
   elseif s:name =~ '^zsh\>'

File runtime/syntax/lss.vim

 " Vim syntax file
 " Language:	Lynx 2.7.1 style file
-" Maintainer:	Scott Bigham <dsb@cs.duke.edu>
-" Last Change:	2001 May 09
+" Maintainer:	Scott Bigham <dsb@killerbunnies.org>
+" Last Change:	2004 Oct 06
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded

File runtime/syntax/pccts.vim

 " Vim syntax file
 " Language:	PCCTS
-" Maintainer:	Scott Bigham <dsb@cs.duke.edu>
+" Maintainer:	Scott Bigham <dsb@killerbunnies.org>
 " Last Change:	10 Aug 1999
 
 " For version 5.x: Clear all syntax items

File runtime/syntax/pod.vim

 " Vim syntax file
 " Language:	Perl POD format
-" Maintainer:	Scott Bigham <dsb@cs.duke.edu>
-" Last Change:	2001 May 09
+" Maintainer:	Scott Bigham <dsb@killerbunnies.org>
+" Last Change:	2004 Oct 05
 
 " To add embedded POD documentation highlighting to your syntax file, add
 " the commands:
 endif
 
 " POD commands
-syn match podCommand	"^=head[12]"	nextgroup=podCmdText
+syn match podCommand	"^=head[1234]"	nextgroup=podCmdText
 syn match podCommand	"^=item"	nextgroup=podCmdText
 syn match podCommand	"^=over"	nextgroup=podOverIndent skipwhite
 syn match podCommand	"^=back"
 syn match podSpecial	"[$@%]\I\i*\(::\I\i*\)*\>"
 
 " Special formatting sequences
-syn region podFormat	start="[IBSCLFXEZ]<" end=">" oneline contains=podFormat
+syn region podFormat	start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat
+syn match  podFormat	"Z<>"
+syn match  podFormat	"E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2
+syn match  podEscape	"\I\i*>"me=e-1 contained
+syn match  podEscape2	"\d\+>"me=e-1 contained
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
   HiLink podFormat		Identifier
   HiLink podVerbatimLine	PreProc
   HiLink podSpecial		Identifier
+  HiLink podEscape		String
+  HiLink podEscape2		Number
 
   delcommand HiLink
 endif

File runtime/syntax/samba.vim

 " Language:	samba configuration files (smb.conf)
 " Maintainer:	Rafael Garcia-Suarez <rgarciasuarez@free.fr>
 " URL:		http://rgarciasuarez.free.fr/vim/syntax/samba.vim
-" Last change:	2002 May 06
+" Last change:	2004 September 21
 
 " Don't forget to run your config file through testparm(1)!
 
 syn case ignore
 
 syn match sambaParameter /^[a-zA-Z \t]\+=/ contains=sambaKeyword
-syn match sambaSection /^\s*\[[a-zA-Z0-9_\-. ]\+\]/
-syn match sambaMacro /%[SPugUGHvhmLMNpRdaIT]/
+syn match sambaSection /^\s*\[[a-zA-Z0-9_\-.$ ]\+\]/
+syn match sambaMacro /%[SPugUGHvhmLMNpRdaITD]/
 syn match sambaMacro /%$([a-zA-Z0-9_]\+)/
 syn match sambaComment /^\s*[;#].*/
 syn match sambaContinue /\\$/
 syn keyword sambaKeyword contained disable dn egd entropy enum extensions mmap
 syn keyword sambaKeyword contained policy spin spoolss
 
+" Since Samba 3.0.2
+syn keyword sambaKeyword contained abort afs algorithmic backend
+syn keyword sambaKeyword contained charset cups defer display
+syn keyword sambaKeyword contained enable idmap kerberos lookups
+syn keyword sambaKeyword contained methods modules nested NIS ntlm NTLMv2
+syn keyword sambaKeyword contained objects paranoid partners passdb
+syn keyword sambaKeyword contained plaintext prefix primary private
+syn keyword sambaKeyword contained profile quota realm replication
+syn keyword sambaKeyword contained reported rid schannel sendfile sharing
+syn keyword sambaKeyword contained shutdown signing special spnego
+syn keyword sambaKeyword contained store unknown unwriteable
+
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
 " For version 5.8 and later: only when an item doesn't have highlighting yet

File runtime/syntax/scheme.vim

     syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature 
     syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export
     syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax
-    hi def link schemeExtSyntax Type
 
     syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker
     syn keyword schemeExtFunc use-standard-linker use-standard-compiler
     syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch?
     " Command-line parsing
     syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each 
-    hi def link schemeExtFunc PreProc
 
     " syntax quoting, unquoting and quasiquotation
     syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL
     syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL
 endif
 
+
+if exists("b:is_chicken") || exists("is_chicken")
+    syn match schemeOther oneline    "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
+    syn match schemeExtSyntax oneline    "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
+
+    syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec
+    syn keyword schemeExtSyntax foreign-lambda foreign-lambda* 
+    syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable
+    syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno
+
+    " here-string
+    syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+
+ 
+    if filereadable(expand("<sfile>:p:h")."/cpp.vim")
+	unlet! b:current_syntax
+	syn include @ChickenC <sfile>:p:h/cpp.vim
+	syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC
+	syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC
+    endif
+
+endif
+
 " Synchronization and the wrapping up...
 
 syn sync match matchPlace grouphere NONE "^[^ \t]"
   HiLink schemeBoolean		Boolean
 
   HiLink schemeDelimiter	Delimiter
-  HiLink schemeConstant	Constant
+  HiLink schemeConstant		Constant
 
   HiLink schemeComment		Comment
   HiLink schemeMultilineComment	Comment
   HiLink schemeError		Error
 
+  HiLink schemeExtSyntax	Type
+  HiLink schemeExtFunc		PreProc
   delcommand HiLink
 endif
 

File src/GvimExt/gvimext.cpp

 	    *pos = 0;
 	}
 	// Now concatenate
-	strncpy(temp, _("Edit with existing Vim - &"), MAX_PATH - 1);
+	strncpy(temp, _("Edit with existing Vim - "), MAX_PATH - 1);
 	strncat(temp, title, MAX_PATH - 1);
 	InsertMenu(hMenu,
 		indexMenu++,

File src/Makefile

 
 # All GUI files
 ALL_GUI_SRC  = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c gui_kde.cc gui_kde_wid.cc gui_kde_x11.cc gui_kde_wid_moc.cc
-ALL_GUI_PRO  = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro gui_kde.pro gui_kde_x11.pro
+ALL_GUI_PRO  = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro
 
 # }}}
 

File src/digraph.c

 	{'L', 'i', 0x20a4},
 	{'P', 't', 0x20a7},
 	{'W', '=', 0x20a9},
+	{'=', 'e', 0x20ac}, /* euro */
 	{'o', 'C', 0x2103},
 	{'c', 'o', 0x2105},
 	{'o', 'F', 0x2109},
     unsigned	len;
 
     oldval = vimvars[VV_CMDARG].val;
-    if (eap != NULL)
-    {
-	if (eap->force_bin == FORCE_BIN)
-	    len = 6;
-	else if (eap->force_bin == FORCE_NOBIN)
-	    len = 8;
-	else
-	    len = 0;
-	if (eap->force_ff != 0)
-	    len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
+    if (eap == NULL)
+    {
+	vim_free(oldval);
+	vimvars[VV_CMDARG].val = oldarg;
+	return NULL;
+    }
+
+    if (eap->force_bin == FORCE_BIN)
+	len = 6;
+    else if (eap->force_bin == FORCE_NOBIN)
+	len = 8;
+    else
+	len = 0;
+    if (eap->force_ff != 0)
+	len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
 # ifdef FEAT_MBYTE
-	if (eap->force_enc != 0)
-	    len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
+    if (eap->force_enc != 0)
+	len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
 # endif
 
-	newval = alloc(len + 1);
-	if (newval == NULL)
-	    return NULL;
-
-	if (eap->force_bin == FORCE_BIN)
-	    sprintf((char *)newval, " ++bin");
-	else if (eap->force_bin == FORCE_NOBIN)
-	    sprintf((char *)newval, " ++nobin");
-	else
-	    *newval = NUL;
-	if (eap->force_ff != 0)
-	    sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
-						    eap->cmd + eap->force_ff);
+    newval = alloc(len + 1);
+    if (newval == NULL)
+	return NULL;
+
+    if (eap->force_bin == FORCE_BIN)
+	sprintf((char *)newval, " ++bin");
+    else if (eap->force_bin == FORCE_NOBIN)
+	sprintf((char *)newval, " ++nobin");
+    else
+	*newval = NUL;
+    if (eap->force_ff != 0)
+	sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
+						eap->cmd + eap->force_ff);
 # ifdef FEAT_MBYTE
-	if (eap->force_enc != 0)
-	    sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
-						   eap->cmd + eap->force_enc);
+    if (eap->force_enc != 0)
+	sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
+					       eap->cmd + eap->force_enc);
 # endif
-	vimvars[VV_CMDARG].val = newval;
-	return oldval;
-    }
-
-    vim_free(oldval);
-    vimvars[VV_CMDARG].val = oldarg;
-    return NULL;
+    vimvars[VV_CMDARG].val = newval;
+    return oldval;
 }
 #endif
 

File src/fileio.c

 	{
 #ifdef FEAT_MBYTE
 	    if (write_info.bw_conv_error)
-		errmsg = (char_u *)_("E513: write error, conversion failed");
+		errmsg = (char_u *)_("E513: write error, conversion failed (make 'fenc' empty to override)");
 	    else
 #endif
 		if (got_int)

File src/globals.h

 /* Codepage nr of 'encoding'.  Negative means it's not been set yet, zero
  * means 'encoding' is not a valid codepage. */
 EXTERN int	enc_codepage INIT(= -1);
+EXTERN int	enc_latin9 INIT(= FALSE);	/* 'encoding' is latin9 */
 # endif
 EXTERN int	has_mbyte INIT(= 0);		/* any multi-byte encoding */
 

File src/gui_gtk.c

 
 	    text    = CONVERT_TO_UTF8(menu->dname);
 	    tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]);
+	    if (tooltip != NULL && !utf_valid_string(tooltip, NULL))
+		/* Invalid text, can happen when 'encoding' is changed.  Avoid
+		 * a nasty GTK error message, skip the tooltip. */
+		CONVERT_TO_UTF8_FREE(tooltip);
 
 	    menu->id = gtk_toolbar_insert_item(
 		    toolbar,
 
 # ifdef HAVE_GTK2
 	tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]);
+	if (tooltip == NULL || utf_valid_string(tooltip, NULL))
+	    /* Only set the tooltip when it's valid utf-8. */
 # else
 	tooltip = menu->strings[MENU_INDEX_TIP];
 # endif

File src/gui_gtk_x11.c

 	int		last_glyph_rbearing;
 	int		cells = 0;  /* cells occupied by current cluster */
 
+	/* Safety check: pango crashes when invoked with invalid utf-8
+	 * characters. */
+	if (!utf_valid_string(s, s + len))
+	{
+	    column_offset = len;
+	    goto skipitall;
+	}
+
 	/* original width of the current cluster */
 	cluster_width = PANGO_SCALE * gui.char_width;
 
 	pango_attr_list_unref(attr_list);
     }
 
+skipitall:
     if (flags & DRAW_UNDERL)
 	gdk_draw_line(gui.drawarea->window,
 		      gui.text_gc,

File src/gui_mac.c

     KeySym		key_sym;
     int			key_char;
     int			modifiers;
+    int			simplify = FALSE;
 
     /* Mask the mouse (as per user setting) */
     if (p_mh)
 
     /* Handle special keys. */
 #if 0
-    /* Why have this been removed? */
+    /* Why has this been removed? */
     if	(!(theEvent->modifiers & (cmdKey | controlKey | rightControlKey)))
 #endif
     {
 # endif
 			key_char = TO_SPECIAL(special_keys[i].vim_code0,
 						special_keys[i].vim_code1);
-		    key_char = simplify_key(key_char,&modifiers);
+		    simplify = TRUE;
 		    break;
 		}
     }
 
+    /* For some keys the modifier is included in the char itself. */
+    if (simplify || key_char == TAB || key_char == ' ')
+	key_char = simplify_key(key_char, &modifiers);
 
     /* Add the modifier to the input bu if needed */
     /* Do not want SHIFT-A or CTRL-A with modifier */

File src/gui_w32.c

 }
 #endif
 
+#ifdef FEAT_MBYTE
+/*
+ * Convert latin9 text to ucs-2.
+ */
+    static void
+latin9_to_ucs(char_u *text, int len, WCHAR *unicodebuf)
+{
+    int		c;
+
+    while (len-- >= 0)
+    {
+	c = *text++;
+	switch (c)
+	{
+	    case 0xa4: c = 0x20ac; break;   /* euro */
+	    case 0xa6: c = 0x0160; break;   /* S hat */
+	    case 0xa8: c = 0x0161; break;   /* S -hat */
+	    case 0xb4: c = 0x017d; break;   /* Z hat */
+	    case 0xb8: c = 0x017e; break;   /* Z -hat */
+	    case 0xbc: c = 0x0152; break;   /* OE */
+	    case 0xbd: c = 0x0153; break;   /* oe */
+	    case 0xbe: c = 0x0178; break;   /* Y */
+	}
+	*unicodebuf++ = c;
+    }
+}
+#endif
 
 #ifdef FEAT_RIGHTLEFT
 /*
     /* Check if the Unicode buffer exists and is big enough.  Create it
      * with the same lengt as the multi-byte string, the number of wide
      * characters is always equal or smaller. */
-    if ((enc_utf8 || (enc_codepage > 0 && (int)GetACP() != enc_codepage))
+    if ((enc_utf8
+		|| (enc_codepage > 0 && (int)GetACP() != enc_codepage)
+		|| enc_latin9)
 	    && (unicodebuf == NULL || len > unibuflen))
     {
 	vim_free(unicodebuf);
 			     foptions, pcliprect, unicodebuf, clen, unicodepdy);
 	len = cells;	/* used for underlining */
     }
-    else if (enc_codepage > 0 && (int)GetACP() != enc_codepage)
+    else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
     {
 	/* If we want to display codepage data, and the current CP is not the
 	 * ANSI one, we need to go via Unicode. */
 	if (unicodebuf != NULL)
 	{
-	    len = MultiByteToWideChar(enc_codepage,
+	    if (enc_latin9)
+		latin9_to_ucs(text, len, unicodebuf);
+	    else
+		len = MultiByteToWideChar(enc_codepage,
 			MB_PRECOMPOSED,
 			(char *)text, len,
 			(LPWSTR)unicodebuf, unibuflen);

File src/gui_w48.c

     return 0;
 }
 
+
 /*
  * Get command line arguments.
  * Use "prog" as the name of the program and "cmdline" as the arguments.
     char	**argv = NULL;
     int		round;
 
+#ifdef FEAT_MBYTE
+    /* Try using the Unicode version first, it takes care of conversion when
+     * 'encoding' is changed. */
+    argc = get_cmd_argsW(&argv);
+    if (argc != 0)
+	goto done;
+#endif
+
     /* Handle the program name.  Remove the ".exe" extension, and find the 1st
      * non-space. */
     p = strrchr(prog, '.');
 	}
     }
 
+done:
+
     argv[argc] = NULL;		/* NULL-terminated list */
-
     *argvp = argv;
     return argc;
 }
 #define IDX_ISO_14	13
     {"iso-8859-14",	ENC_8BIT,		0},
 #define IDX_ISO_15	14
-    {"iso-8859-15",	ENC_8BIT,		0},
+    {"iso-8859-15",	ENC_8BIT + ENC_LATIN9,	0},
 #define IDX_KOI8_R	15
     {"koi8-r",		ENC_8BIT,		0},
 #define IDX_KOI8_U	16
 
 #ifdef WIN3264
     enc_codepage = encname2codepage(p_enc);
+    enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0);
 #endif
 
     /*
     return 1 - dbcs_head_off(base, p);
 }
 
+#if defined(HAVE_GTK2) || defined(PROTO)
+/*
+ * Return TRUE if string "s" is a valid utf-8 string.
+ * When "end" is NULL stop at the first NUL.
+ * When "end" is positive stop there.
+ */
+    int
+utf_valid_string(s, end)
+    char_u	*s;
+    char_u	*end;
+{
+    int		l;
+    char_u	*p = s;
+
+    while (end == NULL ? *p != NUL : p < end)
+    {
+	if ((*p & 0xc0) == 0x80)
+	    return FALSE;	/* invalid lead byte */
+	l = utf8len_tab[*p];
+	if (end != NULL && p + l > end)
+	    return FALSE;	/* incomplete byte sequence */
+	++p;
+	while (--l > 0)
+	    if ((*p++ & 0xc0) != 0x80)
+		return FALSE;	/* invalid trail byte */
+    }
+    return TRUE;
+}
+#endif
+
 #if defined(FEAT_GUI) || defined(PROTO)
 /*
  * Special version of mb_tail_off() for use in ScreenLines[].
 	vcp->vc_type = CONV_TO_UTF8;
 	vcp->vc_factor = 2;	/* up to twice as long */
     }
+    else if ((from_prop & ENC_LATIN9) && (to_prop & ENC_UNICODE))
+    {
+	/* Internal latin9 -> utf-8 conversion. */
+	vcp->vc_type = CONV_9_TO_UTF8;
+	vcp->vc_factor = 3;	/* up to three as long (euro sign) */
+    }
     else if ((from_prop & ENC_UNICODE) && (to_prop & ENC_LATIN1))
     {
 	/* Internal utf-8 -> latin1 conversion. */
 	vcp->vc_type = CONV_TO_LATIN1;
     }
+    else if ((from_prop & ENC_UNICODE) && (to_prop & ENC_LATIN9))
+    {
+	/* Internal utf-8 -> latin9 conversion. */
+	vcp->vc_type = CONV_TO_LATIN9;
+    }
 #ifdef WIN3264
     /* Win32-specific codepage <-> codepage conversion without iconv. */
     else if (((from_prop & ENC_UNICODE) || encname2codepage(from) > 0)
 	    d = retval;
 	    for (i = 0; i < len; ++i)
 	    {
-		if (ptr[i] < 0x80)
-		    *d++ = ptr[i];
+		c = ptr[i];
+		if (c < 0x80)
+		    *d++ = c;
 		else
 		{
-		    *d++ = 0xc0 + ((unsigned)ptr[i] >> 6);
-		    *d++ = 0x80 + (ptr[i] & 0x3f);
+		    *d++ = 0xc0 + ((unsigned)c >> 6);
+		    *d++ = 0x80 + (c & 0x3f);
 		}
 	    }
 	    *d = NUL;
 		*lenp = (int)(d - retval);
 	    break;
 
+	case CONV_9_TO_UTF8:	/* latin9 to utf-8 conversion */
+	    retval = alloc(len * 3 + 1);
+	    if (retval == NULL)
+		break;
+	    d = retval;
+	    for (i = 0; i < len; ++i)
+	    {
+		c = ptr[i];
+		switch (c)
+		{
+		    case 0xa4: c = 0x20ac; break;   /* euro */
+		    case 0xa6: c = 0x0160; break;   /* S hat */
+		    case 0xa8: c = 0x0161; break;   /* S -hat */
+		    case 0xb4: c = 0x017d; break;   /* Z hat */
+		    case 0xb8: c = 0x017e; break;   /* Z -hat */
+		    case 0xbc: c = 0x0152; break;   /* OE */
+		    case 0xbd: c = 0x0153; break;   /* oe */
+		    case 0xbe: c = 0x0178; break;   /* Y */
+		}
+		d += utf_char2bytes(c, d);
+	    }
+	    *d = NUL;
+	    if (lenp != NULL)
+		*lenp = (int)(d - retval);
+	    break;
+
 	case CONV_TO_LATIN1:	/* utf-8 to latin1 conversion */
+	case CONV_TO_LATIN9:	/* utf-8 to latin9 conversion */
 	    retval = alloc(len + 1);
 	    if (retval == NULL)
 		break;
 		else
 		{
 		    c = utf_ptr2char(ptr + i);
+		    if (vcp->vc_type == CONV_TO_LATIN9)
+			switch (c)
+			{
+			    case 0x20ac: c = 0xa4; break;   /* euro */
+			    case 0x0160: c = 0xa6; break;   /* S hat */
+			    case 0x0161: c = 0xa8; break;   /* S -hat */
+			    case 0x017d: c = 0xb4; break;   /* Z hat */
+			    case 0x017e: c = 0xb8; break;   /* Z -hat */
+			    case 0x0152: c = 0xbc; break;   /* OE */
+			    case 0x0153: c = 0xbd; break;   /* oe */
+			    case 0x0178: c = 0xbe; break;   /* Y */
+			    case 0xa4:
+			    case 0xa6:
+			    case 0xa8:
+			    case 0xb4:
+			    case 0xb8:
+			    case 0xbc:
+			    case 0xbd:
+			    case 0xbe: c = 0x100; break; /* not in latin9 */
+			}
 		    if (!utf_iscomposing(c))	/* skip composing chars */
 		    {
 			if (c < 0x100)
 	    map_to = (char_u *)"";
 	    map_buf = NULL;
 	}
+	else if (modes & MENU_TIP_MODE)
+	    map_buf = NULL;	/* Menu tips are plain text. */
 	else
 	    map_to = replace_termcodes(map_to, &map_buf, FALSE, TRUE);
 	menuarg.modes = modes;

File src/os_mswin.c

     AnsiUpperBuff(toupper_tab, 256);
     AnsiLowerBuff(tolower_tab, 256);
 #endif
+
+#if defined(FEAT_MBYTE) && !defined(FEAT_GUI)
+    (void)get_cmd_argsW(NULL);
+#endif
 }
 
 
     gui_mch_settitle(title, icon);
 # else
     if (title != NULL)
+    {
+#  ifdef FEAT_MBYTE
+	if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+	{
+	    /* Convert the title from 'encoding' to the active codepage. */
+	    WCHAR	*wp = enc_to_ucs2(title, NULL);
+	    int	n;
+
+	    if (wp != NULL)
+	    {
+		n = SetConsoleTitleW(wp);
+		vim_free(wp);
+		if (n != 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+		    return;
+	    }
+	}
+#  endif
 	SetConsoleTitle(title);
+    }
 # endif
 }
 

File src/os_w32exe.c

 	__ARGS((int argc, char **argv));
 int (_cdecl *pmain)(int, char **);
 
-#ifdef FEAT_MBYTE
-/* The commandline arguments in UCS2. */
-static DWORD	nArgsW = 0;
-static LPWSTR	*ArglistW = NULL;
-static int	global_argc;
-static char	**global_argv;
-
-static int	used_file_argc = 0;	/* last argument in global_argv[] used
-					   for the argument list. */
-static int	*used_file_indexes = NULL; /* indexes in global_argv[] for
-					      command line arguments added to
-					      the argument list */
-static int	used_file_count = 0;	/* nr of entries in used_file_indexes */
-static int	used_file_literal = FALSE;  /* take file names literally */
-static int	used_file_full_path = FALSE;  /* file name was full path */
-static int	used_alist_count = 0;
-#endif
-
 #ifndef PROTO
 #ifdef FEAT_GUI
 #ifndef VIMDLL
      * startup path (so the .vimrc file can be found w/o a VIM env. var.) */
     GetModuleFileName(NULL, prog, 255);
 
-    /* Separate the command line into arguments.  Use the Unicode functions
-     * when possible. When 'encoding' is later changed these are used to
-     * recode the arguments. */
-#ifdef FEAT_MBYTE
-    ArglistW = CommandLineToArgvW(GetCommandLineW(), &nArgsW);
-    if (ArglistW != NULL)
+    argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree);
+    if (argc == 0)
     {
-	argv = malloc((nArgsW + 1) * sizeof(char *));
-	if (argv != NULL)
-	{
-	    int		i;
-
-	    argv[argc] = NULL;
-	    argc = nArgsW;
-	    for (i = 0; i < argc; ++i)
-	    {
-		int	len;
-
-		WideCharToMultiByte_alloc(GetACP(), 0,
-				ArglistW[i], wcslen(ArglistW[i]) + 1,
-				(LPSTR *)&argv[i], &len, 0, 0);
-		if (argv[i] == NULL)
-		{
-		    while (i > 0)
-			free(argv[--i]);
-		    free(argv);
-		    argc = 0;
-		}
-	    }
-	}
+	MessageBox(0, "Could not allocate memory for command line.",
+							      "VIM Error", 0);
+	return 0;
     }
 
-    if (argc == 0)
-#endif
-    {
-	argc = get_cmd_args(prog, (char *)lpszCmdLine, &argv, &tofree);
-	if (argc == 0)
-	{
-	    MessageBox(0, "Could not allocate memory for command line.",
-								  "VIM Error", 0);
-	    return 0;
-	}
-    }
-
-#ifdef FEAT_MBYTE
-    global_argc = argc;
-    global_argv = argv;
-    used_file_indexes = malloc(argc * sizeof(int));
-#endif
-
 #ifdef DYNAMIC_GETTEXT
     /* Initialize gettext library */
     dyn_libintl_init(NULL);
     free(argv);
     free(tofree);
 #ifdef FEAT_MBYTE
-    if (ArglistW != NULL)
-	GlobalFree(ArglistW);
+    free_cmd_argsW();
 #endif
 
     return 0;
 }
 #endif
-
-#ifdef FEAT_MBYTE
-/*
- * Remember "name" is an argument that was added to the argument list.
- * This avoids that we have to re-parse the argument list when fix_arg_enc()
- * is called.
- */
-    void
-used_file_arg(name, literal, full_path)
-    char	*name;
-    int		literal;
-    int		full_path;
-{
-    int		i;
-
-    if (used_file_indexes == NULL)