summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.202
blob: 1289e08519419352c65437e256e428f6f6733e47 (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
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
To: vim_dev@googlegroups.com
Subject: Patch 7.3.202
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.3.202
Problem:    Cannot influence the indent inside a namespace.
Solution:   Add the "N" 'cino' parameter. (Konstantin Lepa)
Files:      runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in,
            src/testdir/test3.ok


*** ../mercurial/vim73/runtime/doc/indent.txt	2011-04-28 19:01:26.000000000 +0200
--- runtime/doc/indent.txt	2011-05-25 14:35:37.000000000 +0200
***************
*** 128,140 ****
  used CTRL-T or CTRL-D.
  
  						*cinoptions-values*
! The 'cinoptions' option sets how Vim performs indentation.  In the list below,
  "N" represents a number of your choice (the number can be negative).  When
  there is an 's' after the number, Vim multiplies the number by 'shiftwidth':
  "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc.  You can use a
! decimal point, too: "-0.5s" is minus half a 'shiftwidth'.  The examples below
! assume a 'shiftwidth' of 4.
! 
  	>N    Amount added for "normal" indent.  Used after a line that should
  	      increase the indent (lines starting with "if", an opening brace,
  	      etc.).  (default 'shiftwidth').
--- 128,147 ----
  used CTRL-T or CTRL-D.
  
  						*cinoptions-values*
! The 'cinoptions' option sets how Vim performs indentation.  The value after
! the option character can be one of these (N is any number):
! 	N	indent N spaces
! 	-N	indent N spaces to the left
! 	Ns	N times 'shiftwidth spaces
! 	-Ns	N times 'shiftwidth spaces to the left
! 
! In the list below,
  "N" represents a number of your choice (the number can be negative).  When
  there is an 's' after the number, Vim multiplies the number by 'shiftwidth':
  "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc.  You can use a
! decimal point, too: "-0.5s" is minus half a 'shiftwidth'.
! The examples below assume a 'shiftwidth' of 4.
! 							*cino->*
  	>N    Amount added for "normal" indent.  Used after a line that should
  	      increase the indent (lines starting with "if", an opening brace,
  	      etc.).  (default 'shiftwidth').
***************
*** 145,150 ****
--- 152,158 ----
  		      foo;		foo;			  foo;
  		  }		      }			  }
  <
+ 							*cino-e*
  	eN    Add N to the prevailing indent inside a set of braces if the
  	      opening brace at the End of the line (more precise: is not the
  	      first character in a line).  This is useful if you want a
***************
*** 160,165 ****
--- 168,174 ----
  		      bar;		  bar;		      bar;
  		  }		      }			  }
  <
+ 							*cino-n*
  	nN    Add N to the prevailing indent for a statement after an "if",
  	      "while", etc., if it is NOT inside a set of braces.  This is
  	      useful if you want a different indent when there is no '{'
***************
*** 174,179 ****
--- 183,189 ----
  		      bar;		  bar;		      bar;
  		  }		      }			  }
  <
+ 							*cino-f*
  	fN    Place the first opening brace of a function or other block in
  	      column N.  This applies only for an opening brace that is not
  	      inside other braces and is at the start of the line.  What comes
***************
*** 184,189 ****
--- 194,200 ----
  		  {			{		      {
  		      int foo;		    int foo;		  int foo;
  <
+ 							*cino-{*
  	{N    Place opening braces N characters from the prevailing indent.
  	      This applies only for opening braces that are inside other
  	      braces.  (default 0).
***************
*** 193,198 ****
--- 204,210 ----
  		  {			{		      {
  		      foo;		  foo;		      foo;
  <
+ 							*cino-}*
  	}N    Place closing braces N characters from the matching opening
  	      brace.  (default 0).
  
***************
*** 202,207 ****
--- 214,220 ----
  		      foo;		  foo;		      foo;
  		  }		      }			    }
  <
+ 							*cino-^*
  	^N    Add N to the prevailing indent inside a set of braces if the
  	      opening brace is in column 0.  This can specify a different
  	      indent for whole of a function (some may like to set it to a
***************
*** 216,221 ****
--- 229,235 ----
  		      }			}		  }
  		  }		      }			  }
  <
+ 							*cino-L*
  	LN    Controls placement of jump labels. If N is negative, the label
  	      will be placed at column 1. If N is non-negative, the indent of
  	      the label will be the prevailing indent minus N.  (default -1).
***************
*** 229,234 ****
--- 243,249 ----
  		      }                   }                   }
  		  }                   }                   }
  <
+ 							*cino-:*
  	:N    Place case labels N characters from the indent of the switch().
  	      (default 'shiftwidth').
  
***************
*** 240,245 ****
--- 255,261 ----
  		      default:	      default:
  		  }		      }
  <
+ 							*cino-=*
  	=N    Place statements occurring after a case label N characters from
  	      the indent of the label.  (default 'shiftwidth').
  
***************
*** 247,252 ****
--- 263,269 ----
  		   case 11:		case 11:  a = a + 1;
  		       a = a + 1;		  b = b + 1;
  <
+ 							*cino-l*
  	lN    If N != 0 Vim will align with a case label instead of the
  	      statement after it in the same line.
  
***************
*** 256,261 ****
--- 273,279 ----
  				    break;	      break;
  				}		  }
  <
+ 							*cino-b*
  	bN    If N != 0 Vim will align a final "break" with the case label,
  	      so that case..break looks like a sort of block.  (default: 0).
  	      When using 1, consider adding "0=break" to 'cinkeys'.
***************
*** 272,277 ****
--- 290,296 ----
  			  break;	  break;
  		  }		      }
  <
+ 							*cino-g*
  	gN    Place C++ scope declarations N characters from the indent of the
  	      block they are in.  (default 'shiftwidth').  A scope declaration
  	      can be "public:", "protected:" or "private:".
***************
*** 283,288 ****
--- 302,308 ----
  		      private:	      private:
  		  }		      }
  <
+ 							*cino-h*
  	hN    Place statements occurring after a C++ scope declaration N
  	      characters from the indent of the label.  (default
  	      'shiftwidth').
***************
*** 291,296 ****
--- 311,331 ----
  		   public:		public:   a = a + 1;
  		       a = a + 1;		  b = b + 1;
  <
+ 							*cino-N*
+ 	NN    Indent inside C++ namespace N characters extra compared to a
+ 	      normal block.  (default 0).
+ 
+ 		cino=			   cino=N-s >
+ 		  namespace {                namespace {
+ 		      void function();       void function();
+ 		  }                          }
+ 
+ 		  namespace my               namespace my
+ 		  {                          {
+ 		      void function();       void function();
+ 		  }                          }
+ <
+ 							*cino-p*
  	pN    Parameter declarations for K&R-style function declarations will
  	      be indented N characters from the margin.  (default
  	      'shiftwidth').
***************
*** 300,305 ****
--- 335,341 ----
  		      int a;	      int a;			  int a;
  		      char b;	      char b;			  char b;
  <
+ 							*cino-t*
  	tN    Indent a function return type declaration N characters from the
  	      margin.  (default 'shiftwidth').
  
***************
*** 307,312 ****
--- 343,349 ----
  		      int	      int			 int
  		  func()	      func()		  func()
  <
+ 							*cino-i*
  	iN    Indent C++ base class declarations and constructor
  	      initializations, if they start in a new line (otherwise they
  	      are aligned at the right side of the ':').
***************
*** 330,335 ****
--- 368,374 ----
  		  a = b + 9 *		    a = b + 9 *
  		      c;			      c;
  <
+ 							*cino-c*
  	cN    Indent comment lines after the comment opener, when there is no
  	      other text with which to align, N characters from the comment
  	      opener.  (default 3).  See also |format-comments|.
***************
*** 339,344 ****
--- 378,384 ----
  		     text.			 text.
  		   */			     */
  <
+ 							*cino-C*
  	CN    When N is non-zero, indent comment lines by the amount specified
  	      with the c flag above even if there is other text behind the
  	      comment opener.  (default 0).
***************
*** 349,360 ****
--- 389,402 ----
  		  ********/		    ********/
  <	      (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")
  
+ 							*cino-/*
  	/N    Indent comment lines N characters extra.  (default 0).
  		cino=			  cino=/4 >
  		  a = b;		    a = b;
  		  /* comment */			/* comment */
  		  c = d;		    c = d;
  <
+ 							*cino-(*
  	(N    When in unclosed parentheses, indent N characters from the line
  	      with the unclosed parentheses.  Add a 'shiftwidth' for every
  	      unclosed parentheses.  When N is 0 or the unclosed parentheses
***************
*** 370,375 ****
--- 412,418 ----
  			  (c2 || c3))		(c2 || c3))
  		     {			       {
  <
+ 							*cino-u*
  	uN    Same as (N, but for one level deeper.  (default 'shiftwidth').
  
  		cino=			  cino=u2 >
***************
*** 377,382 ****
--- 420,426 ----
  			  && (c22345		    && (c22345
  			      || c3))		      || c3))
  <
+ 							*cino-U*
  	UN    When N is non-zero, do not ignore the indenting specified by
  	      ( or u in case that the unclosed parentheses is the first
  	      non-white character in its line.  (default 0).
***************
*** 388,393 ****
--- 432,438 ----
  		       c3			    c3
  		      ) && c4;			) && c4;
  <
+ 							*cino-2*
  	wN    When in unclosed parentheses and N is non-zero and either
  	      using "(0" or "u0", respectively, or using "U0" and the unclosed
  	      parentheses is the first non-white character in its line, line
***************
*** 400,405 ****
--- 445,451 ----
  				|| c3))		    || c3))
  		      foo;			foo;
  <
+ 							*cino-W*
  	WN    When in unclosed parentheses and N is non-zero and either
  	      using "(0" or "u0", respectively and the unclosed parentheses is
  	      the last non-white character in its line and it is not the
***************
*** 414,419 ****
--- 460,466 ----
  		  a_short_line(argument,    a_short_line(argument,
  			       argument);		 argument);
  <
+ 							*cino-m*
  	mN    When N is non-zero, line up a line starting with a closing
  	      parentheses with the first character of the line with the
  	      matching opening parentheses.  (default 0).
***************
*** 428,433 ****
--- 475,481 ----
  		     )			    )
  		      foo;			foo;
  <
+ 							*cino-M*
  	MN    When N is non-zero, line up a line starting with a closing
  	      parentheses with the first character of the previous line.
  	      (default 0).
***************
*** 437,443 ****
  			 cond2			   cond2
  		     )				   )
  <
! 					*java-cinoptions* *java-indenting*
  	jN    Indent java anonymous classes correctly.  The value 'N' is
  	      currently unused but must be non-zero (e.g. 'j1').  'j1' will
  	      indent for example the following code snippet correctly: >
--- 485,491 ----
  			 cond2			   cond2
  		     )				   )
  <
! 				*java-cinoptions* *java-indenting* *cino-j*
  	jN    Indent java anonymous classes correctly.  The value 'N' is
  	      currently unused but must be non-zero (e.g. 'j1').  'j1' will
  	      indent for example the following code snippet correctly: >
***************
*** 448,454 ****
  		    }
  		});
  <
! 				*javascript-cinoptions* *javascript-indenting*
  	JN    Indent JavaScript object declarations correctly by not confusing
  	      them with labels.  The value 'N' is currently unused but must be 
  	      non-zero (e.g. 'J1'). >
--- 496,502 ----
  		    }
  		});
  <
! 			*javascript-cinoptions* *javascript-indenting* *cino-J*
  	JN    Indent JavaScript object declarations correctly by not confusing
  	      them with labels.  The value 'N' is currently unused but must be 
  	      non-zero (e.g. 'J1'). >
***************
*** 483,489 ****
  
  
  The defaults, spelled out in full, are:
! 	cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,
  			c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
  
  Vim puts a line in column 1 if:
--- 534,540 ----
  
  
  The defaults, spelled out in full, are:
! 	cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
  			c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
  
  Vim puts a line in column 1 if:
*** ../mercurial/vim73/src/misc1.c	2011-05-25 13:33:59.000000000 +0200
--- src/misc1.c	2011-05-25 14:57:31.000000000 +0200
***************
*** 4959,4964 ****
--- 4959,4965 ----
  static int	corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos));
  static int	find_last_paren __ARGS((char_u *l, int start, int end));
  static int	find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
+ static int	cin_is_cpp_namespace __ARGS((char_u *));
  
  static int	ind_hash_comment = 0;   /* # starts a comment */
  
***************
*** 5221,5226 ****
--- 5222,5271 ----
      return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
  }
  
+ /* Maximum number of lines to search back for a "namespace" line. */
+ #define FIND_NAMESPACE_LIM 20
+ 
+ /*
+  * Recognize a "namespace" scope declaration.
+  */
+     static int
+ cin_is_cpp_namespace(s)
+     char_u	*s;
+ {
+     char_u	*p;
+     int		has_name = FALSE;
+ 
+     s = cin_skipcomment(s);
+     if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
+     {
+ 	p = cin_skipcomment(skipwhite(s + 9));
+ 	while (*p != NUL)
+ 	{
+ 	    if (vim_iswhite(*p))
+ 	    {
+ 		has_name = TRUE; /* found end of a name */
+ 		p = cin_skipcomment(skipwhite(p));
+ 	    }
+ 	    else if (*p == '{')
+ 	    {
+ 		break;
+ 	    }
+ 	    else if (vim_iswordc(*p))
+ 	    {
+ 		if (has_name)
+ 		    return FALSE; /* word character after skipping past name */
+ 		++p;
+ 	    }
+ 	    else
+ 	    {
+ 		return FALSE;
+ 	    }
+ 	}
+ 	return TRUE;
+     }
+     return FALSE;
+ }
+ 
  /*
   * Return a pointer to the first non-empty non-comment character after a ':'.
   * Return NULL if not found.
***************
*** 6296,6301 ****
--- 6341,6351 ----
       */
      int ind_keep_case_label = 0;
  
+     /*
+      * handle C++ namespace
+      */
+     int ind_cpp_namespace = 0;
+ 
      pos_T	cur_curpos;
      int		amount;
      int		scope_amount;
***************
*** 6336,6341 ****
--- 6386,6392 ----
      int		n;
      int		iscase;
      int		lookfor_break;
+     int		lookfor_cpp_namespace = FALSE;
      int		cont_amount = 0;    /* amount for continuation line */
      int		original_line_islabel;
  
***************
*** 6409,6414 ****
--- 6460,6466 ----
  	    case 'J': ind_js = n; break;
  	    case 'l': ind_keep_case_label = n; break;
  	    case '#': ind_hash_comment = n; break;
+ 	    case 'N': ind_cpp_namespace = n; break;
  	}
  	if (*options == ',')
  	    ++options;
***************
*** 6976,6986 ****
--- 7028,7051 ----
  	    if (start_brace == BRACE_IN_COL0)	    /* '{' is in column 0 */
  	    {
  		amount = ind_open_left_imag;
+ 		lookfor_cpp_namespace = TRUE;
+ 	    }
+ 	    else if (start_brace == BRACE_AT_START &&
+ 		    lookfor_cpp_namespace)	  /* '{' is at start */
+ 	    {
+ 
+ 		lookfor_cpp_namespace = TRUE;
  	    }
  	    else
  	    {
  		if (start_brace == BRACE_AT_END)    /* '{' is at end of line */
+ 		{
  		    amount += ind_open_imag;
+ 
+ 		    l = skipwhite(ml_get_curline());
+ 		    if (cin_is_cpp_namespace(l))
+ 			amount += ind_cpp_namespace;
+ 		}
  		else
  		{
  		    /* Compensate for adding ind_open_extra later. */
***************
*** 7151,7156 ****
--- 7216,7261 ----
  			else
  			    amount += ind_continuation;
  		    }
+ 		    else if (lookfor_cpp_namespace)
+ 		    {
+ 			if (curwin->w_cursor.lnum == ourscope)
+ 			    continue;
+ 
+ 			if (curwin->w_cursor.lnum == 0
+ 				|| curwin->w_cursor.lnum
+ 					      < ourscope - FIND_NAMESPACE_LIM)
+ 			    break;
+ 
+ 			l = ml_get_curline();
+ 
+ 			/*
+ 			 * If we're in a comment now, skip to the start of the
+ 			 * comment.
+ 			 */
+ 			trypos = find_start_comment(ind_maxcomment);
+ 			if (trypos != NULL)
+ 			{
+ 			    curwin->w_cursor.lnum = trypos->lnum + 1;
+ 			    curwin->w_cursor.col = 0;
+ 			    continue;
+ 			}
+ 
+ 			/*
+ 			 * Skip preprocessor directives and blank lines.
+ 			 */
+ 			if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum))
+ 			    continue;
+ 
+ 			if (cin_is_cpp_namespace(l))
+ 			{
+ 			    amount += ind_cpp_namespace;
+ 			    break;
+ 			}
+ 
+ 			if (cin_nocode(l))
+ 			    continue;
+ 
+ 		    }
  		    else if (lookfor != LOOKFOR_TERM
  					  && lookfor != LOOKFOR_CPP_BASECLASS)
  		    {
*** ../mercurial/vim73/src/testdir/test3.in	2011-05-25 13:33:59.000000000 +0200
--- src/testdir/test3.in	2011-05-25 14:47:31.000000000 +0200
***************
*** 799,804 ****
--- 799,867 ----
  	df */
  		hello
  }
+ 
+ /* valid namespaces with normal indent */
+ namespace
+ {
+ {
+   111111111111;
+ }
+ }
+ namespace /* test */
+ {
+   11111111111111111;
+ }
+ namespace // test
+ {
+   111111111111111111;
+ }
+ namespace
+ {
+   111111111111111111;
+ }
+ namespace test
+ {
+   111111111111111111;
+ }
+ namespace{
+   111111111111111111;
+ }
+ namespace test{
+   111111111111111111;
+ }
+ namespace {
+   111111111111111111;
+ }
+ namespace test {
+   111111111111111111;
+ namespace test2 {
+   22222222222222222;
+ }
+ }
+ 
+ /* invalid namespaces use block indent */
+ namespace test test2 {
+   111111111111111111111;
+ }
+ namespace11111111111 {
+   111111111111;
+ }
+ namespace() {
+   1111111111111;
+ }
+ namespace()
+ {
+   111111111111111111;
+ }
+ namespace test test2
+ {
+   1111111111111111111;
+ }
+ namespace111111111
+ {
+   111111111111111111;
+ }
+ 
  /* end of AUTO */
  
  STARTTEST
***************
*** 1428,1433 ****
--- 1491,1566 ----
  }
  
  STARTTEST
+ :set cino=N-s
+ /namespaces
+ =/^NAMESPACEEND
+ ENDTEST
+ 
+ /* valid namespaces with normal indent */
+ namespace
+ {
+    {
+ 	111111111111;
+ }
+ }
+ namespace /* test */
+ {
+   11111111111111111;
+ }
+ namespace // test
+ {
+   111111111111111111;
+ }
+ namespace
+ {
+   111111111111111111;
+ }
+ namespace test
+ {
+   111111111111111111;
+ }
+ namespace{
+   111111111111111111;
+ }
+ namespace test{
+   111111111111111111;
+ }
+ namespace {
+   111111111111111111;
+ }
+ namespace test {
+   111111111111111111;
+ namespace test2 {
+   22222222222222222;
+ }
+ }
+ 
+ /* invalid namespaces use block indent */
+ namespace test test2 {
+   111111111111111111111;
+ }
+ namespace11111111111 {
+   111111111111;
+ }
+ namespace() {
+   1111111111111;
+ }
+ namespace()
+ {
+   111111111111111111;
+ }
+ namespace test test2
+ {
+   1111111111111111111;
+ }
+ namespace111111111
+ {
+   111111111111111111;
+ }
+ NAMESPACEEND
+ 
+ 
+ STARTTEST
  :g/^STARTTEST/.,/^ENDTEST/d
  :1;/start of AUTO/,$wq! test.out
  ENDTEST
*** ../mercurial/vim73/src/testdir/test3.ok	2011-05-25 13:33:59.000000000 +0200
--- src/testdir/test3.ok	2011-05-25 14:48:02.000000000 +0200
***************
*** 787,792 ****
--- 787,855 ----
  	   df */
  	hello
  }
+ 
+ /* valid namespaces with normal indent */
+ namespace
+ {
+ 	{
+ 		111111111111;
+ 	}
+ }
+ namespace /* test */
+ {
+ 	11111111111111111;
+ }
+ namespace // test
+ {
+ 	111111111111111111;
+ }
+ namespace
+ {
+ 	111111111111111111;
+ }
+ namespace test
+ {
+ 	111111111111111111;
+ }
+ namespace{
+ 	111111111111111111;
+ }
+ namespace test{
+ 	111111111111111111;
+ }
+ namespace {
+ 	111111111111111111;
+ }
+ namespace test {
+ 	111111111111111111;
+ 	namespace test2 {
+ 		22222222222222222;
+ 	}
+ }
+ 
+ /* invalid namespaces use block indent */
+ namespace test test2 {
+ 	111111111111111111111;
+ }
+ namespace11111111111 {
+ 	111111111111;
+ }
+ namespace() {
+ 	1111111111111;
+ }
+ namespace()
+ {
+ 	111111111111111111;
+ }
+ namespace test test2
+ {
+ 	1111111111111111111;
+ }
+ namespace111111111
+ {
+ 	111111111111111111;
+ }
+ 
  /* end of AUTO */
  
  
***************
*** 1273,1275 ****
--- 1336,1403 ----
  	baz();
  }
  
+ 
+ /* valid namespaces with normal indent */
+ namespace
+ {
+ {
+ 	111111111111;
+ }
+ }
+ namespace /* test */
+ {
+ 11111111111111111;
+ }
+ namespace // test
+ {
+ 111111111111111111;
+ }
+ namespace
+ {
+ 111111111111111111;
+ }
+ namespace test
+ {
+ 111111111111111111;
+ }
+ namespace{
+ 111111111111111111;
+ }
+ namespace test{
+ 111111111111111111;
+ }
+ namespace {
+ 111111111111111111;
+ }
+ namespace test {
+ 111111111111111111;
+ namespace test2 {
+ 22222222222222222;
+ }
+ }
+ 
+ /* invalid namespaces use block indent */
+ namespace test test2 {
+ 	111111111111111111111;
+ }
+ namespace11111111111 {
+ 	111111111111;
+ }
+ namespace() {
+ 	1111111111111;
+ }
+ namespace()
+ {
+ 	111111111111111111;
+ }
+ namespace test test2
+ {
+ 	1111111111111111111;
+ }
+ namespace111111111
+ {
+ 	111111111111111111;
+ }
+ NAMESPACEEND
+ 
+ 
*** ../vim-7.3.201/src/version.c	2011-05-25 13:33:59.000000000 +0200
--- src/version.c	2011-05-25 15:14:20.000000000 +0200
***************
*** 711,712 ****
--- 711,714 ----
  {   /* Add new patch number below this line */
+ /**/
+     202,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
     keyboard.

 /// 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    ///