073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.191
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.191
073263
Problem:    Escaping a file name for shell commands can't be done without a
073263
            function.
073263
Solution:   Add the :S file name modifier.
073263
Files:      src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
073263
            src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
073263
            src/testdir/Make_vms.mms, src/testdir/Makefile,
073263
            src/testdir/test105.in, src/testdir/test105.ok,
073263
            runtime/doc/cmdline.txt, runtime/doc/eval.txt,
073263
            runtime/doc/map.txt, runtime/doc/options.txt,
073263
            runtime/doc/quickfix.txt, runtime/doc/usr_30.txt,
073263
            runtime/doc/usr_40.txt, runtime/doc/usr_42.txt,
073263
            runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c,
073263
            src/proto/misc2.pro
073263
073263
073263
*** ../vim-7.4.190/src/testdir/Make_amiga.mak	2014-02-05 22:25:29.974568243 +0100
073263
--- src/testdir/Make_amiga.mak	2014-02-23 23:16:51.056762395 +0100
073263
***************
073263
*** 35,41 ****
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test97.out test98.out \
073263
  		test99.out test100.out test101.out test102.out test103.out \
073263
! 		test104.out
073263
  
073263
  .SUFFIXES: .in .out
073263
  
073263
--- 35,41 ----
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test97.out test98.out \
073263
  		test99.out test100.out test101.out test102.out test103.out \
073263
! 		test104.out test105.out
073263
  
073263
  .SUFFIXES: .in .out
073263
  
073263
***************
073263
*** 156,158 ****
073263
--- 156,159 ----
073263
  test102.out: test102.in
073263
  test103.out: test103.in
073263
  test104.out: test104.in
073263
+ test105.out: test105.in
073263
*** ../vim-7.4.190/src/testdir/Make_dos.mak	2014-02-05 22:25:29.978568243 +0100
073263
--- src/testdir/Make_dos.mak	2014-02-23 23:17:41.840762314 +0100
073263
***************
073263
*** 33,39 ****
073263
  		test84.out test85.out test86.out test87.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out
073263
  
073263
  SCRIPTS32 =	test50.out test70.out
073263
  
073263
--- 33,40 ----
073263
  		test84.out test85.out test86.out test87.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out \
073263
! 		test105.out
073263
  
073263
  SCRIPTS32 =	test50.out test70.out
073263
  
073263
*** ../vim-7.4.190/src/testdir/Make_ming.mak	2014-02-05 22:25:29.978568243 +0100
073263
--- src/testdir/Make_ming.mak	2014-02-23 23:17:29.400762333 +0100
073263
***************
073263
*** 53,59 ****
073263
  		test84.out test85.out test86.out test87.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out
073263
  
073263
  SCRIPTS32 =	test50.out test70.out
073263
  
073263
--- 53,60 ----
073263
  		test84.out test85.out test86.out test87.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out \
073263
! 		test105.out
073263
  
073263
  SCRIPTS32 =	test50.out test70.out
073263
  
073263
*** ../vim-7.4.190/src/testdir/Make_os2.mak	2014-02-05 22:25:29.978568243 +0100
073263
--- src/testdir/Make_os2.mak	2014-02-23 23:17:49.476762302 +0100
073263
***************
073263
*** 35,41 ****
073263
  		test81.out test82.out test83.out test84.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out
073263
  
073263
  .SUFFIXES: .in .out
073263
  
073263
--- 35,42 ----
073263
  		test81.out test82.out test83.out test84.out test88.out \
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test98.out test99.out \
073263
! 		test100.out test101.out test102.out test103.out test104.out \
073263
! 		test105.out
073263
  
073263
  .SUFFIXES: .in .out
073263
  
073263
*** ../vim-7.4.190/src/testdir/Make_vms.mms	2014-02-05 22:25:29.978568243 +0100
073263
--- src/testdir/Make_vms.mms	2014-02-23 23:17:56.596762290 +0100
073263
***************
073263
*** 4,10 ****
073263
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
073263
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
073263
  #
073263
! # Last change:  2013 Nov 21
073263
  #
073263
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
073263
  # Edit the lines in the Configuration section below to select.
073263
--- 4,10 ----
073263
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
073263
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
073263
  #
073263
! # Last change:  2014 Feb 23
073263
  #
073263
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
073263
  # Edit the lines in the Configuration section below to select.
073263
***************
073263
*** 79,85 ****
073263
  	 test82.out test83.out test84.out test88.out test89.out \
073263
  	 test90.out test91.out test92.out test93.out test94.out \
073263
  	 test95.out test96.out test97.out test98.out test99.out \
073263
! 	 test100.out test101.out test102.out test103.out test104.out
073263
  
073263
  # Known problems:
073263
  # Test 30: a problem around mac format - unknown reason
073263
--- 79,86 ----
073263
  	 test82.out test83.out test84.out test88.out test89.out \
073263
  	 test90.out test91.out test92.out test93.out test94.out \
073263
  	 test95.out test96.out test97.out test98.out test99.out \
073263
! 	 test100.out test101.out test102.out test103.out test104.out \
073263
! 	 test105.out
073263
  
073263
  # Known problems:
073263
  # Test 30: a problem around mac format - unknown reason
073263
*** ../vim-7.4.190/src/testdir/Makefile	2014-02-05 22:25:29.982568243 +0100
073263
--- src/testdir/Makefile	2014-02-23 23:18:14.040762262 +0100
073263
***************
073263
*** 31,37 ****
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test97.out test98.out \
073263
  		test99.out test100.out test101.out test102.out test103.out \
073263
! 		test104.out
073263
  
073263
  SCRIPTS_GUI = test16.out
073263
  
073263
--- 31,37 ----
073263
  		test89.out test90.out test91.out test92.out test93.out \
073263
  		test94.out test95.out test96.out test97.out test98.out \
073263
  		test99.out test100.out test101.out test102.out test103.out \
073263
! 		test104.out test105.out
073263
  
073263
  SCRIPTS_GUI = test16.out
073263
  
073263
*** ../vim-7.4.190/src/testdir/test105.in	2014-02-23 23:35:40.680760596 +0100
073263
--- src/testdir/test105.in	2014-02-23 23:30:24.748761099 +0100
073263
***************
073263
*** 0 ****
073263
--- 1,45 ----
073263
+ Test filename modifiers     vim: set ft=vim :
073263
+ 
073263
+ STARTTEST
073263
+ :source small.vim
073263
+ :%delete _
073263
+ :set shell=sh
073263
+ :set shellslash
073263
+ :let tab="\t"
073263
+ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
073263
+ :let $HOME=fnamemodify('.', ':p:h:h:h')
073263
+ :Put fnamemodify('.',              ':p'      )[-1:]
073263
+ :Put fnamemodify('.',              ':p:h'    )[-1:]
073263
+ :Put fnamemodify('test.out',       ':p'      )[-1:]
073263
+ :Put fnamemodify('test.out',       ':.'      )
073263
+ :Put fnamemodify('../testdir/a',   ':.'      )
073263
+ :Put fnamemodify('test.out',       ':~'      )
073263
+ :Put fnamemodify('../testdir/a',   ':~'      )
073263
+ :Put fnamemodify('../testdir/a',   ':t'      )
073263
+ :Put fnamemodify('.',              ':p:t'    )
073263
+ :Put fnamemodify('test.out',       ':p:t'    )
073263
+ :Put fnamemodify('test.out',       ':p:e'    )
073263
+ :Put fnamemodify('test.out',       ':p:t:e'  )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':r'      )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r'    )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )
073263
+ :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':e'      )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e'    )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')
073263
+ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )
073263
+ :Put fnamemodify('abc def',        ':S'      )
073263
+ :Put fnamemodify('abc" "def',      ':S'      )
073263
+ :Put fnamemodify('abc"%"def',      ':S'      )
073263
+ :Put fnamemodify('abc'' ''def',    ':S'      )
073263
+ :Put fnamemodify('abc''%''def',    ':S'      )
073263
+ :Put fnamemodify("abc\ndef",       ':S'      )
073263
+ :set shell=tcsh
073263
+ :Put fnamemodify("abc\ndef",       ':S'      )
073263
+ :$put ='vim: ts=8'
073263
+ :1 delete _
073263
+ :w! test.out
073263
+ :qa!
073263
+ ENDTEST
073263
+ 
073263
*** ../vim-7.4.190/src/testdir/test105.ok	2014-02-23 23:35:40.688760596 +0100
073263
--- src/testdir/test105.ok	2014-02-23 23:32:11.204760929 +0100
073263
***************
073263
*** 0 ****
073263
--- 1,29 ----
073263
+ fnamemodify('.',              ':p'      )[-1:]	'/'
073263
+ fnamemodify('.',              ':p:h'    )[-1:]	'r'
073263
+ fnamemodify('test.out',       ':p'      )[-1:]	't'
073263
+ fnamemodify('test.out',       ':.'      )	'test.out'
073263
+ fnamemodify('../testdir/a',   ':.'      )	'a'
073263
+ fnamemodify('test.out',       ':~'      )	'~/src/testdir/test.out'
073263
+ fnamemodify('../testdir/a',   ':~'      )	'~/src/testdir/a'
073263
+ fnamemodify('../testdir/a',   ':t'      )	'a'
073263
+ fnamemodify('.',              ':p:t'    )	''
073263
+ fnamemodify('test.out',       ':p:t'    )	'test.out'
073263
+ fnamemodify('test.out',       ':p:e'    )	'out'
073263
+ fnamemodify('test.out',       ':p:t:e'  )	'out'
073263
+ fnamemodify('abc.fb2.tar.gz', ':r'      )	'abc.fb2.tar'
073263
+ fnamemodify('abc.fb2.tar.gz', ':r:r'    )	'abc.fb2'
073263
+ fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )	'abc'
073263
+ substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')	'src/testdir/abc.fb2'
073263
+ fnamemodify('abc.fb2.tar.gz', ':e'      )	'gz'
073263
+ fnamemodify('abc.fb2.tar.gz', ':e:e'    )	'tar.gz'
073263
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )	'fb2.tar.gz'
073263
+ fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')	'fb2.tar.gz'
073263
+ fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )	'tar'
073263
+ fnamemodify('abc def',        ':S'      )	'''abc def'''
073263
+ fnamemodify('abc" "def',      ':S'      )	'''abc" "def'''
073263
+ fnamemodify('abc"%"def',      ':S'      )	'''abc"%"def'''
073263
+ fnamemodify('abc'' ''def',    ':S'      )	'''abc''\'''' ''\''''def'''
073263
+ fnamemodify('abc''%''def',    ':S'      )	'''abc''\''''%''\''''def'''
073263
+ fnamemodify("abc\ndef",       ':S'      )	'''abc^@def'''
073263
+ fnamemodify("abc\ndef",       ':S'      )	'''abc\^@def'''
073263
+ vim: ts=8
073263
*** ../vim-7.4.190/runtime/doc/cmdline.txt	2013-11-09 05:30:18.000000000 +0100
073263
--- runtime/doc/cmdline.txt	2014-02-23 23:20:57.020762003 +0100
073263
***************
073263
*** 758,763 ****
073263
--- 758,764 ----
073263
  function expand() |expand()|.
073263
  	%	Is replaced with the current file name.		  *:_%* *c_%*
073263
  	#	Is replaced with the alternate file name.	  *:_#* *c_#*
073263
+ 		This is remembered for every window.
073263
  	#n	(where n is a number) is replaced with		  *:_#0* *:_#n*
073263
  		the file name of buffer n.  "#0" is the same as "#".     *c_#n*
073263
  	##	Is replaced with all names in the argument list	  *:_##* *c_##*
073263
***************
073263
*** 823,830 ****
073263
  		   the start of the function.
073263
  
073263
  							 *filename-modifiers*
073263
! 	 *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
073263
! 	        *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
073263
  The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
073263
  "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
073263
  These are not available when Vim has been compiled without the |+modify_fname|
073263
--- 824,831 ----
073263
  		   the start of the function.
073263
  
073263
  							 *filename-modifiers*
073263
! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
073263
!      *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
073263
  The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
073263
  "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
073263
  These are not available when Vim has been compiled without the |+modify_fname|
073263
***************
073263
*** 879,884 ****
073263
--- 880,889 ----
073263
  	:gs?pat?sub?
073263
  		Substitute all occurrences of "pat" with "sub".  Otherwise
073263
  		this works like ":s".
073263
+ 	:S	Escape special characters for use with a shell command (see 
073263
+ 		|shellescape()|). Must be the last one. Examples: >
073263
+ 		    :!dir <cfile>:S
073263
+ 		    :call system('chmod +w -- ' . expand('%:S'))
073263
  
073263
  Examples, when the file name is "src/version.c", current dir
073263
  "/home/mool/vim": >
073263
*** ../vim-7.4.190/runtime/doc/eval.txt	2014-01-14 12:33:32.000000000 +0100
073263
--- runtime/doc/eval.txt	2014-02-23 23:19:32.420762138 +0100
073263
***************
073263
*** 5414,5419 ****
073263
--- 5428,5434 ----
073263
  <		This results in a directory listing for the file under the
073263
  		cursor.  Example of use with |system()|: >
073263
  		    :call system("chmod +w -- " . shellescape(expand("%")))
073263
+ <		See also |::S|.
073263
  
073263
  
073263
  shiftwidth()						*shiftwidth()*
073263
***************
073263
*** 5896,5909 ****
073263
  		passed as stdin to the command.  The string is written as-is,
073263
  		you need to take care of using the correct line separators
073263
  		yourself.  Pipes are not used.
073263
! 		Note: Use |shellescape()| to escape special characters in a
073263
! 		command argument.  Newlines in {expr} may cause the command to
073263
! 		fail.  The characters in 'shellquote' and 'shellxquote' may
073263
! 		also cause trouble.
073263
  		This is not to be used for interactive commands.
073263
  
073263
  		The result is a String.  Example: >
073263
  		    :let files = system("ls " .  shellescape(expand('%:h')))
073263
  
073263
  <		To make the result more system-independent, the shell output
073263
  		is filtered to replace <CR> with <NL> for Macintosh, and
073263
--- 5911,5926 ----
073263
  		passed as stdin to the command.  The string is written as-is,
073263
  		you need to take care of using the correct line separators
073263
  		yourself.  Pipes are not used.
073263
! 		Note: Use |shellescape()| or |::S| with |expand()| or 
073263
! 		|fnamemodify()| to escape special characters in a command 
073263
! 		argument.  Newlines in {expr} may cause the command to fail.  
073263
! 		The characters in 'shellquote' and 'shellxquote' may also 
073263
! 		cause trouble.
073263
  		This is not to be used for interactive commands.
073263
  
073263
  		The result is a String.  Example: >
073263
  		    :let files = system("ls " .  shellescape(expand('%:h')))
073263
+ 		    :let files = system('ls ' . expand('%:h:S'))
073263
  
073263
  <		To make the result more system-independent, the shell output
073263
  		is filtered to replace <CR> with <NL> for Macintosh, and
073263
*** ../vim-7.4.190/runtime/doc/map.txt	2013-08-10 13:24:56.000000000 +0200
073263
--- runtime/doc/map.txt	2014-02-23 23:19:32.424762138 +0100
073263
***************
073263
*** 380,386 ****
073263
     The simplest way to load a set of related language mappings is by using the
073263
  'keymap' option.  See |45.5|.
073263
     In Insert mode and in Command-line mode the mappings can be disabled with
073263
! the CTRL-^ command |i_CTRL-^| |c_CTRL-^| These commands change the value of
073263
  the 'iminsert' option.  When starting to enter a normal command line (not a
073263
  search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
073263
  last used is remembered for Insert mode and Search patterns separately.  The
073263
--- 380,386 ----
073263
     The simplest way to load a set of related language mappings is by using the
073263
  'keymap' option.  See |45.5|.
073263
     In Insert mode and in Command-line mode the mappings can be disabled with
073263
! the CTRL-^ command |i_CTRL-^| |c_CTRL-^|. These commands change the value of
073263
  the 'iminsert' option.  When starting to enter a normal command line (not a
073263
  search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
073263
  last used is remembered for Insert mode and Search patterns separately.  The
073263
***************
073263
*** 593,599 ****
073263
  When you have a mapping that contains an Ex command, you need to put a line
073263
  terminator after it to have it executed.  The use of <CR> is recommended for
073263
  this (see |<>|).  Example: >
073263
!    :map  _ls  :!ls -l %<CR>:echo "the end"<CR>
073263
  
073263
  To avoid mapping of the characters you type in insert or Command-line mode,
073263
  type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
073263
--- 593,599 ----
073263
  When you have a mapping that contains an Ex command, you need to put a line
073263
  terminator after it to have it executed.  The use of <CR> is recommended for
073263
  this (see |<>|).  Example: >
073263
!    :map  _ls  :!ls -l %:S<CR>:echo "the end"<CR>
073263
  
073263
  To avoid mapping of the characters you type in insert or Command-line mode,
073263
  type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
073263
*** ../vim-7.4.190/runtime/doc/options.txt	2013-11-12 04:43:57.000000000 +0100
073263
--- runtime/doc/options.txt	2014-02-23 23:19:32.428762138 +0100
073263
***************
073263
*** 4757,4764 ****
073263
  			global or local to buffer |global-local|
073263
  			{not in Vi}
073263
  	Program to use for the ":make" command.  See |:make_makeprg|.
073263
! 	This option may contain '%' and '#' characters, which are expanded to
073263
! 	the current and alternate file name. |:_%| |:_#|
073263
  	Environment variables are expanded |:set_env|.  See |option-backslash|
073263
  	about including spaces and backslashes.
073263
  	Note that a '|' must be escaped twice: once for ":set" and once for
073263
--- 4757,4765 ----
073263
  			global or local to buffer |global-local|
073263
  			{not in Vi}
073263
  	Program to use for the ":make" command.  See |:make_makeprg|.
073263
! 	This option may contain '%' and '#' characters (see  |:_%| and |:_#|), 
073263
! 	which are expanded to the current and alternate file name.  Use |::S| 
073263
! 	to escape file names in case they contain special characters.
073263
  	Environment variables are expanded |:set_env|.  See |option-backslash|
073263
  	about including spaces and backslashes.
073263
  	Note that a '|' must be escaped twice: once for ":set" and once for
073263
*** ../vim-7.4.190/runtime/doc/quickfix.txt	2013-08-10 13:25:00.000000000 +0200
073263
--- runtime/doc/quickfix.txt	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 838,844 ****
073263
  The alltests.py script seems to be used quite often, that's all.
073263
  Useful values for the 'makeprg' options therefore are:
073263
   setlocal makeprg=./alltests.py " Run a testsuite
073263
!  setlocal makeprg=python %      " Run a single testcase
073263
  
073263
  Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
073263
  
073263
--- 838,844 ----
073263
  The alltests.py script seems to be used quite often, that's all.
073263
  Useful values for the 'makeprg' options therefore are:
073263
   setlocal makeprg=./alltests.py " Run a testsuite
073263
!  setlocal makeprg=python\ %:S   " Run a single testcase
073263
  
073263
  Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
073263
  
073263
***************
073263
*** 1332,1338 ****
073263
  Here is an alternative from Michael F. Lamb for Unix that filters the errors
073263
  first: >
073263
    :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
073263
!   :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter
073263
  
073263
  You need to put the following in "vim-javac-filter" somewhere in your path
073263
  (e.g., in ~/bin) and make it executable: >
073263
--- 1332,1338 ----
073263
  Here is an alternative from Michael F. Lamb for Unix that filters the errors
073263
  first: >
073263
    :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
073263
!   :setl makeprg=javac\ %:S\ 2>&1\ \\\|\ vim-javac-filter
073263
  
073263
  You need to put the following in "vim-javac-filter" somewhere in your path
073263
  (e.g., in ~/bin) and make it executable: >
073263
*** ../vim-7.4.190/runtime/doc/usr_30.txt	2013-08-10 13:25:05.000000000 +0200
073263
--- runtime/doc/usr_30.txt	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 128,134 ****
073263
  You can include special Vim keywords in the command specification.  The %
073263
  character expands to the name of the current file.  So if you execute the
073263
  command: >
073263
! 	:set makeprg=make\ %
073263
  
073263
  When you are editing main.c, then ":make" executes the following command: >
073263
  
073263
--- 128,134 ----
073263
  You can include special Vim keywords in the command specification.  The %
073263
  character expands to the name of the current file.  So if you execute the
073263
  command: >
073263
! 	:set makeprg=make\ %:S
073263
  
073263
  When you are editing main.c, then ":make" executes the following command: >
073263
  
073263
***************
073263
*** 137,143 ****
073263
  This is not too useful, so you will refine the command a little and use the :r
073263
  (root) modifier: >
073263
  
073263
! 	:set makeprg=make\ %:r.o
073263
  
073263
  Now the command executed is as follows: >
073263
  
073263
--- 137,143 ----
073263
  This is not too useful, so you will refine the command a little and use the :r
073263
  (root) modifier: >
073263
  
073263
! 	:set makeprg=make\ %:r:S.o
073263
  
073263
  Now the command executed is as follows: >
073263
  
073263
*** ../vim-7.4.190/runtime/doc/usr_40.txt	2013-08-10 13:25:05.000000000 +0200
073263
--- runtime/doc/usr_40.txt	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 209,215 ****
073263
  separates the two commands.  This also means that a | character can't be used
073263
  inside a map command.  To include one, use <Bar> (five characters).  Example:
073263
  >
073263
! 	:map <F8> :write <Bar> !checkin %<CR>
073263
  
073263
  The same problem applies to the ":unmap" command, with the addition that you
073263
  have to watch out for trailing white space.  These two commands are different:
073263
--- 209,215 ----
073263
  separates the two commands.  This also means that a | character can't be used
073263
  inside a map command.  To include one, use <Bar> (five characters).  Example:
073263
  >
073263
! 	:map <F8> :write <Bar> !checkin %:S<CR>
073263
  
073263
  The same problem applies to the ":unmap" command, with the addition that you
073263
  have to watch out for trailing white space.  These two commands are different:
073263
*** ../vim-7.4.190/runtime/doc/usr_42.txt	2013-08-10 13:25:05.000000000 +0200
073263
--- runtime/doc/usr_42.txt	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 311,317 ****
073263
  item with a bitmap.  For example, define a new toolbar item with: >
073263
  
073263
  	:tmenu ToolBar.Compile  Compile the current file
073263
! 	:amenu ToolBar.Compile  :!cc % -o %:r<CR>
073263
  
073263
  Now you need to create the icon.  For MS-Windows it must be in bitmap format,
073263
  with the name "Compile.bmp".  For Unix XPM format is used, the file name is
073263
--- 311,317 ----
073263
  item with a bitmap.  For example, define a new toolbar item with: >
073263
  
073263
  	:tmenu ToolBar.Compile  Compile the current file
073263
! 	:amenu ToolBar.Compile  :!cc %:S -o %:r:S<CR>
073263
  
073263
  Now you need to create the icon.  For MS-Windows it must be in bitmap format,
073263
  with the name "Compile.bmp".  For Unix XPM format is used, the file name is
073263
*** ../vim-7.4.190/runtime/doc/vi_diff.txt	2013-08-10 13:25:07.000000000 +0200
073263
--- runtime/doc/vi_diff.txt	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 540,546 ****
073263
  Added :wnext command.  Same as ":write" followed by ":next".
073263
  
073263
  The ":w!" command always writes, also when the file is write protected.  In Vi
073263
! you would have to do ":!chmod +w %" and ":set noro".
073263
  
073263
  When 'tildeop' has been set, "~" is an operator (must be followed by a
073263
  movement command).
073263
--- 540,546 ----
073263
  Added :wnext command.  Same as ":write" followed by ":next".
073263
  
073263
  The ":w!" command always writes, also when the file is write protected.  In Vi
073263
! you would have to do ":!chmod +w %:S" and ":set noro".
073263
  
073263
  When 'tildeop' has been set, "~" is an operator (must be followed by a
073263
  movement command).
073263
*** ../vim-7.4.190/src/eval.c	2014-02-23 22:54:54.724764490 +0100
073263
--- src/eval.c	2014-02-23 23:19:32.432762138 +0100
073263
***************
073263
*** 16950,16956 ****
073263
      typval_T	*rettv;
073263
  {
073263
      rettv->vval.v_string = vim_strsave_shellescape(
073263
! 		       get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]));
073263
      rettv->v_type = VAR_STRING;
073263
  }
073263
  
073263
--- 16950,16956 ----
073263
      typval_T	*rettv;
073263
  {
073263
      rettv->vval.v_string = vim_strsave_shellescape(
073263
! 		get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE);
073263
      rettv->v_type = VAR_STRING;
073263
  }
073263
  
073263
***************
073263
*** 24355,24360 ****
073263
--- 24355,24371 ----
073263
  	}
073263
      }
073263
  
073263
+     if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S')
073263
+     {
073263
+ 	p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
073263
+ 	if (p == NULL)
073263
+ 	    return -1;
073263
+ 	vim_free(*bufp);
073263
+ 	*bufp = *fnamep = p;
073263
+ 	*fnamelen = (int)STRLEN(p);
073263
+ 	*usedlen += 2;
073263
+     }
073263
+ 
073263
      return valid;
073263
  }
073263
  
073263
*** ../vim-7.4.190/src/misc2.c	2014-01-06 06:18:44.000000000 +0100
073263
--- src/misc2.c	2014-02-23 23:25:44.168761546 +0100
073263
***************
073263
*** 1369,1380 ****
073263
   * Escape a newline, depending on the 'shell' option.
073263
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
073263
   * with "<" like "<cfile>".
073263
   * Returns the result in allocated memory, NULL if we have run out.
073263
   */
073263
      char_u *
073263
! vim_strsave_shellescape(string, do_special)
073263
      char_u	*string;
073263
      int		do_special;
073263
  {
073263
      unsigned	length;
073263
      char_u	*p;
073263
--- 1369,1382 ----
073263
   * Escape a newline, depending on the 'shell' option.
073263
   * When "do_special" is TRUE also replace "!", "%", "#" and things starting
073263
   * with "<" like "<cfile>".
073263
+  * When "do_newline" is FALSE do not escape newline unless it is csh shell.
073263
   * Returns the result in allocated memory, NULL if we have run out.
073263
   */
073263
      char_u *
073263
! vim_strsave_shellescape(string, do_special, do_newline)
073263
      char_u	*string;
073263
      int		do_special;
073263
+     int		do_newline;
073263
  {
073263
      unsigned	length;
073263
      char_u	*p;
073263
***************
073263
*** 1403,1409 ****
073263
  # endif
073263
  	if (*p == '\'')
073263
  	    length += 3;		/* ' => '\'' */
073263
! 	if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
073263
  	{
073263
  	    ++length;			/* insert backslash */
073263
  	    if (csh_like && do_special)
073263
--- 1405,1412 ----
073263
  # endif
073263
  	if (*p == '\'')
073263
  	    length += 3;		/* ' => '\'' */
073263
! 	if ((*p == '\n' && (csh_like || do_newline))
073263
! 		|| (*p == '!' && (csh_like || do_special)))
073263
  	{
073263
  	    ++length;			/* insert backslash */
073263
  	    if (csh_like && do_special)
073263
***************
073263
*** 1454,1460 ****
073263
  		++p;
073263
  		continue;
073263
  	    }
073263
! 	    if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
073263
  	    {
073263
  		*d++ = '\\';
073263
  		if (csh_like && do_special)
073263
--- 1457,1464 ----
073263
  		++p;
073263
  		continue;
073263
  	    }
073263
! 	    if ((*p == '\n' && (csh_like || do_newline))
073263
! 		    || (*p == '!' && (csh_like || do_special)))
073263
  	    {
073263
  		*d++ = '\\';
073263
  		if (csh_like && do_special)
073263
*** ../vim-7.4.190/src/normal.c	2014-02-22 23:49:30.268896843 +0100
073263
--- src/normal.c	2014-02-23 23:19:32.436762138 +0100
073263
***************
073263
*** 5790,5796 ****
073263
      {
073263
  	/* Escape the argument properly for a shell command */
073263
  	ptr = vim_strnsave(ptr, n);
073263
! 	p = vim_strsave_shellescape(ptr, TRUE);
073263
  	vim_free(ptr);
073263
  	if (p == NULL)
073263
  	{
073263
--- 5790,5796 ----
073263
      {
073263
  	/* Escape the argument properly for a shell command */
073263
  	ptr = vim_strnsave(ptr, n);
073263
! 	p = vim_strsave_shellescape(ptr, TRUE, TRUE);
073263
  	vim_free(ptr);
073263
  	if (p == NULL)
073263
  	{
073263
*** ../vim-7.4.190/src/proto/misc2.pro	2013-08-10 13:37:20.000000000 +0200
073263
--- src/proto/misc2.pro	2014-02-23 23:19:32.436762138 +0100
073263
***************
073263
*** 32,38 ****
073263
  char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
073263
  char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
073263
  int csh_like_shell __ARGS((void));
073263
! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
073263
  char_u *vim_strsave_up __ARGS((char_u *string));
073263
  char_u *vim_strnsave_up __ARGS((char_u *string, int len));
073263
  void vim_strup __ARGS((char_u *p));
073263
--- 32,38 ----
073263
  char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
073263
  char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
073263
  int csh_like_shell __ARGS((void));
073263
! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special, int do_newline));
073263
  char_u *vim_strsave_up __ARGS((char_u *string));
073263
  char_u *vim_strnsave_up __ARGS((char_u *string, int len));
073263
  void vim_strup __ARGS((char_u *p));
073263
*** ../vim-7.4.190/src/version.c	2014-02-23 22:58:12.072764176 +0100
073263
--- src/version.c	2014-02-23 23:35:51.044760579 +0100
073263
***************
073263
*** 740,741 ****
073263
--- 740,743 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     191,
073263
  /**/
073263
073263
-- 
073263
Windows
073263
M!uqoms
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///