summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.191
blob: f0bb71bfc9da9df65ca7108a4a0c1970ed31564d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
To: vim_dev@googlegroups.com
Subject: Patch 7.4.191
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.191
Problem:    Escaping a file name for shell commands can't be done without a
            function.
Solution:   Add the :S file name modifier.
Files:      src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
            src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
            src/testdir/Make_vms.mms, src/testdir/Makefile,
            src/testdir/test105.in, src/testdir/test105.ok,
            runtime/doc/cmdline.txt, runtime/doc/eval.txt,
            runtime/doc/map.txt, runtime/doc/options.txt,
            runtime/doc/quickfix.txt, runtime/doc/usr_30.txt,
            runtime/doc/usr_40.txt, runtime/doc/usr_42.txt,
            runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c,
            src/proto/misc2.pro


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

-- 
Windows
M!uqoms

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///