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