home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.071 < prev    next >
Encoding:
Internet Message Format  |  2013-11-05  |  37.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.071
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.071 (after 7.4.069)
  11. Problem:    Passing limits around too often.
  12. Solution:   Use limits from buffer.
  13. Files:      src/edit.c, src/misc1.c, src/proto/misc1.pro
  14.  
  15.  
  16. *** ../vim-7.4.070/src/edit.c    2013-11-05 07:12:59.000000000 +0100
  17. --- src/edit.c    2013-11-06 03:19:10.000000000 +0100
  18. ***************
  19. *** 7857,7864 ****
  20.           if (try_match && keytyped == ':')
  21.           {
  22.           p = ml_get_curline();
  23. !         if (cin_iscase(p, FALSE) || cin_isscopedecl(p)
  24. !                                || cin_islabel(30))
  25.               return TRUE;
  26.           /* Need to get the line again after cin_islabel(). */
  27.           p = ml_get_curline();
  28. --- 7857,7863 ----
  29.           if (try_match && keytyped == ':')
  30.           {
  31.           p = ml_get_curline();
  32. !         if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
  33.               return TRUE;
  34.           /* Need to get the line again after cin_islabel(). */
  35.           p = ml_get_curline();
  36. ***************
  37. *** 7868,7874 ****
  38.           {
  39.               p[curwin->w_cursor.col - 1] = ' ';
  40.               i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
  41. !                               || cin_islabel(30));
  42.               p = ml_get_curline();
  43.               p[curwin->w_cursor.col - 1] = ':';
  44.               if (i)
  45. --- 7867,7873 ----
  46.           {
  47.               p[curwin->w_cursor.col - 1] = ' ';
  48.               i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
  49. !                                 || cin_islabel());
  50.               p = ml_get_curline();
  51.               p[curwin->w_cursor.col - 1] = ':';
  52.               if (i)
  53. *** ../vim-7.4.070/src/misc1.c    2013-11-05 07:12:59.000000000 +0100
  54. --- src/misc1.c    2013-11-06 03:46:59.000000000 +0100
  55. ***************
  56. *** 5191,5201 ****
  57. --- 5191,5208 ----
  58.   #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
  59.   
  60.   static char_u    *skip_string __ARGS((char_u *p));
  61. + static pos_T *ind_find_start_comment __ARGS((void));
  62.   
  63.   /*
  64.    * Find the start of a comment, not knowing if we are in a comment right now.
  65.    * Search starts at w_cursor.lnum and goes backwards.
  66.    */
  67. +     static pos_T *
  68. + ind_find_start_comment()        /* XXX */
  69. + {
  70. +     return find_start_comment(curbuf->b_ind_maxcomment);
  71. + }
  72.       pos_T *
  73.   find_start_comment(ind_maxcomment)        /* XXX */
  74.       int        ind_maxcomment;
  75. ***************
  76. *** 5313,5319 ****
  77.   static int    cin_isdefault __ARGS((char_u *));
  78.   static char_u    *after_label __ARGS((char_u *l));
  79.   static int    get_indent_nolabel __ARGS((linenr_T lnum));
  80. ! static int    skip_label __ARGS((linenr_T, char_u **pp, int ind_maxcomment));
  81.   static int    cin_first_id_amount __ARGS((void));
  82.   static int    cin_get_equal_amount __ARGS((linenr_T lnum));
  83.   static int    cin_ispreproc __ARGS((char_u *));
  84. --- 5320,5326 ----
  85.   static int    cin_isdefault __ARGS((char_u *));
  86.   static char_u    *after_label __ARGS((char_u *l));
  87.   static int    get_indent_nolabel __ARGS((linenr_T lnum));
  88. ! static int    skip_label __ARGS((linenr_T, char_u **pp));
  89.   static int    cin_first_id_amount __ARGS((void));
  90.   static int    cin_get_equal_amount __ARGS((linenr_T lnum));
  91.   static int    cin_ispreproc __ARGS((char_u *));
  92. ***************
  93. *** 5322,5345 ****
  94.   static int    cin_islinecomment __ARGS((char_u *));
  95.   static int    cin_isterminated __ARGS((char_u *, int, int));
  96.   static int    cin_isinit __ARGS((void));
  97. ! static int    cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T, int, int));
  98.   static int    cin_isif __ARGS((char_u *));
  99.   static int    cin_iselse __ARGS((char_u *));
  100.   static int    cin_isdo __ARGS((char_u *));
  101. ! static int    cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
  102.   static int    cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
  103. ! static int    cin_iswhileofdo_end __ARGS((int terminated, int    ind_maxparen, int ind_maxcomment));
  104.   static int    cin_isbreak __ARGS((char_u *));
  105.   static int    cin_is_cpp_baseclass __ARGS((colnr_T *col));
  106. ! static int    get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass));
  107.   static int    cin_ends_in __ARGS((char_u *, char_u *, char_u *));
  108.   static int    cin_starts_with __ARGS((char_u *s, char *word));
  109.   static int    cin_skip2pos __ARGS((pos_T *trypos));
  110. ! static pos_T    *find_start_brace __ARGS((int));
  111. ! static pos_T    *find_match_paren __ARGS((int, int));
  112. ! static int    corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos));
  113.   static int    find_last_paren __ARGS((char_u *l, int start, int end));
  114. ! static int    find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment));
  115.   static int    cin_is_cpp_namespace __ARGS((char_u *));
  116.   
  117.   /*
  118. --- 5329,5352 ----
  119.   static int    cin_islinecomment __ARGS((char_u *));
  120.   static int    cin_isterminated __ARGS((char_u *, int, int));
  121.   static int    cin_isinit __ARGS((void));
  122. ! static int    cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T));
  123.   static int    cin_isif __ARGS((char_u *));
  124.   static int    cin_iselse __ARGS((char_u *));
  125.   static int    cin_isdo __ARGS((char_u *));
  126. ! static int    cin_iswhileofdo __ARGS((char_u *, linenr_T));
  127.   static int    cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
  128. ! static int    cin_iswhileofdo_end __ARGS((int terminated));
  129.   static int    cin_isbreak __ARGS((char_u *));
  130.   static int    cin_is_cpp_baseclass __ARGS((colnr_T *col));
  131. ! static int    get_baseclass_amount __ARGS((int col));
  132.   static int    cin_ends_in __ARGS((char_u *, char_u *, char_u *));
  133.   static int    cin_starts_with __ARGS((char_u *s, char *word));
  134.   static int    cin_skip2pos __ARGS((pos_T *trypos));
  135. ! static pos_T    *find_start_brace __ARGS((void));
  136. ! static pos_T    *find_match_paren __ARGS((int));
  137. ! static int    corr_ind_maxparen __ARGS((pos_T *startpos));
  138.   static int    find_last_paren __ARGS((char_u *l, int start, int end));
  139. ! static int    find_match __ARGS((int lookfor, linenr_T ourscope));
  140.   static int    cin_is_cpp_namespace __ARGS((char_u *));
  141.   
  142.   /*
  143. ***************
  144. *** 5444,5451 ****
  145.    * Note: curwin->w_cursor must be where we are looking for the label.
  146.    */
  147.       int
  148. ! cin_islabel(ind_maxcomment)        /* XXX */
  149. !     int        ind_maxcomment;
  150.   {
  151.       char_u    *s;
  152.   
  153. --- 5451,5457 ----
  154.    * Note: curwin->w_cursor must be where we are looking for the label.
  155.    */
  156.       int
  157. ! cin_islabel()        /* XXX */
  158.   {
  159.       char_u    *s;
  160.   
  161. ***************
  162. *** 5479,5485 ****
  163.            * If we're in a comment now, skip to the start of the comment.
  164.            */
  165.           curwin->w_cursor.col = 0;
  166. !         if ((trypos = find_start_comment(ind_maxcomment)) != NULL) /* XXX */
  167.           curwin->w_cursor = *trypos;
  168.   
  169.           line = ml_get_curline();
  170. --- 5485,5491 ----
  171.            * If we're in a comment now, skip to the start of the comment.
  172.            */
  173.           curwin->w_cursor.col = 0;
  174. !         if ((trypos = ind_find_start_comment()) != NULL) /* XXX */
  175.           curwin->w_cursor = *trypos;
  176.   
  177.           line = ml_get_curline();
  178. ***************
  179. *** 5725,5734 ****
  180.    *        ^
  181.    */
  182.       static int
  183. ! skip_label(lnum, pp, ind_maxcomment)
  184.       linenr_T    lnum;
  185.       char_u    **pp;
  186. -     int        ind_maxcomment;
  187.   {
  188.       char_u    *l;
  189.       int        amount;
  190. --- 5731,5739 ----
  191.    *        ^
  192.    */
  193.       static int
  194. ! skip_label(lnum, pp)
  195.       linenr_T    lnum;
  196.       char_u    **pp;
  197.   {
  198.       char_u    *l;
  199.       int        amount;
  200. ***************
  201. *** 5738,5745 ****
  202.       curwin->w_cursor.lnum = lnum;
  203.       l = ml_get_curline();
  204.                       /* XXX */
  205. !     if (cin_iscase(l, FALSE) || cin_isscopedecl(l)
  206. !                            || cin_islabel(ind_maxcomment))
  207.       {
  208.       amount = get_indent_nolabel(lnum);
  209.       l = after_label(ml_get_curline());
  210. --- 5743,5749 ----
  211.       curwin->w_cursor.lnum = lnum;
  212.       l = ml_get_curline();
  213.                       /* XXX */
  214. !     if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel())
  215.       {
  216.       amount = get_indent_nolabel(lnum);
  217.       l = after_label(ml_get_curline());
  218. ***************
  219. *** 5983,5994 ****
  220.    * "min_lnum" is the line before which we will not be looking.
  221.    */
  222.       static int
  223. ! cin_isfuncdecl(sp, first_lnum, min_lnum, ind_maxparen, ind_maxcomment)
  224.       char_u    **sp;
  225.       linenr_T    first_lnum;
  226.       linenr_T    min_lnum;
  227. -     int        ind_maxparen;
  228. -     int        ind_maxcomment;
  229.   {
  230.       char_u    *s;
  231.       linenr_T    lnum = first_lnum;
  232. --- 5987,5996 ----
  233.    * "min_lnum" is the line before which we will not be looking.
  234.    */
  235.       static int
  236. ! cin_isfuncdecl(sp, first_lnum, min_lnum)
  237.       char_u    **sp;
  238.       linenr_T    first_lnum;
  239.       linenr_T    min_lnum;
  240.   {
  241.       char_u    *s;
  242.       linenr_T    lnum = first_lnum;
  243. ***************
  244. *** 6002,6008 ****
  245.       s = *sp;
  246.   
  247.       if (find_last_paren(s, '(', ')')
  248. !     && (trypos = find_match_paren(ind_maxparen, ind_maxcomment)) != NULL)
  249.       {
  250.       lnum = trypos->lnum;
  251.       if (lnum < min_lnum)
  252. --- 6004,6010 ----
  253.       s = *sp;
  254.   
  255.       if (find_last_paren(s, '(', ')')
  256. !     && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
  257.       {
  258.       lnum = trypos->lnum;
  259.       if (lnum < min_lnum)
  260. ***************
  261. *** 6110,6119 ****
  262.    * ')' and ';'. The condition may be spread over several lines.
  263.    */
  264.       static int
  265. ! cin_iswhileofdo(p, lnum, ind_maxparen)        /* XXX */
  266.       char_u    *p;
  267.       linenr_T    lnum;
  268. -     int        ind_maxparen;
  269.   {
  270.       pos_T    cursor_save;
  271.       pos_T    *trypos;
  272. --- 6112,6120 ----
  273.    * ')' and ';'. The condition may be spread over several lines.
  274.    */
  275.       static int
  276. ! cin_iswhileofdo(p, lnum)        /* XXX */
  277.       char_u    *p;
  278.       linenr_T    lnum;
  279.   {
  280.       pos_T    cursor_save;
  281.       pos_T    *trypos;
  282. ***************
  283. *** 6133,6139 ****
  284.           ++p;
  285.           ++curwin->w_cursor.col;
  286.       }
  287. !     if ((trypos = findmatchlimit(NULL, 0, 0, ind_maxparen)) != NULL
  288.           && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
  289.           retval = TRUE;
  290.       curwin->w_cursor = cursor_save;
  291. --- 6134,6141 ----
  292.           ++p;
  293.           ++curwin->w_cursor.col;
  294.       }
  295. !     if ((trypos = findmatchlimit(NULL, 0, 0,
  296. !                           curbuf->b_ind_maxparen)) != NULL
  297.           && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';')
  298.           retval = TRUE;
  299.       curwin->w_cursor = cursor_save;
  300. ***************
  301. *** 6196,6205 ****
  302.    * Adjust the cursor to the line with "while".
  303.    */
  304.       static int
  305. ! cin_iswhileofdo_end(terminated, ind_maxparen, ind_maxcomment)
  306.       int        terminated;
  307. -     int        ind_maxparen;
  308. -     int        ind_maxcomment;
  309.   {
  310.       char_u    *line;
  311.       char_u    *p;
  312. --- 6198,6205 ----
  313.    * Adjust the cursor to the line with "while".
  314.    */
  315.       static int
  316. ! cin_iswhileofdo_end(terminated)
  317.       int        terminated;
  318.   {
  319.       char_u    *line;
  320.       char_u    *p;
  321. ***************
  322. *** 6223,6229 ****
  323.            * before the matching '('.  XXX */
  324.           i = (int)(p - line);
  325.           curwin->w_cursor.col = i;
  326. !         trypos = find_match_paren(ind_maxparen, ind_maxcomment);
  327.           if (trypos != NULL)
  328.           {
  329.               s = cin_skipcomment(ml_get(trypos->lnum));
  330. --- 6223,6229 ----
  331.            * before the matching '('.  XXX */
  332.           i = (int)(p - line);
  333.           curwin->w_cursor.col = i;
  334. !         trypos = find_match_paren(curbuf->b_ind_maxparen);
  335.           if (trypos != NULL)
  336.           {
  337.               s = cin_skipcomment(ml_get(trypos->lnum));
  338. ***************
  339. *** 6415,6425 ****
  340.   }
  341.   
  342.       static int
  343. ! get_baseclass_amount(col, ind_maxparen, ind_maxcomment, ind_cpp_baseclass)
  344.       int        col;
  345. -     int        ind_maxparen;
  346. -     int        ind_maxcomment;
  347. -     int        ind_cpp_baseclass;
  348.   {
  349.       int        amount;
  350.       colnr_T    vcol;
  351. --- 6415,6422 ----
  352.   }
  353.   
  354.       static int
  355. ! get_baseclass_amount(col)
  356.       int        col;
  357.   {
  358.       int        amount;
  359.       colnr_T    vcol;
  360. ***************
  361. *** 6429,6439 ****
  362.       {
  363.       amount = get_indent();
  364.       if (find_last_paren(ml_get_curline(), '(', ')')
  365. !         && (trypos = find_match_paren(ind_maxparen,
  366. !                              ind_maxcomment)) != NULL)
  367.           amount = get_indent_lnum(trypos->lnum); /* XXX */
  368.       if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
  369. !         amount += ind_cpp_baseclass;
  370.       }
  371.       else
  372.       {
  373. --- 6426,6435 ----
  374.       {
  375.       amount = get_indent();
  376.       if (find_last_paren(ml_get_curline(), '(', ')')
  377. !         && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
  378.           amount = get_indent_lnum(trypos->lnum); /* XXX */
  379.       if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL))
  380. !         amount += curbuf->b_ind_cpp_baseclass;
  381.       }
  382.       else
  383.       {
  384. ***************
  385. *** 6441,6448 ****
  386.       getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
  387.       amount = (int)vcol;
  388.       }
  389. !     if (amount < ind_cpp_baseclass)
  390. !     amount = ind_cpp_baseclass;
  391.       return amount;
  392.   }
  393.   
  394. --- 6437,6444 ----
  395.       getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL);
  396.       amount = (int)vcol;
  397.       }
  398. !     if (amount < curbuf->b_ind_cpp_baseclass)
  399. !     amount = curbuf->b_ind_cpp_baseclass;
  400.       return amount;
  401.   }
  402.   
  403. ***************
  404. *** 6526,6533 ****
  405.   /* }        */
  406.   
  407.       static pos_T *
  408. ! find_start_brace(ind_maxcomment)        /* XXX */
  409. !     int        ind_maxcomment;
  410.   {
  411.       pos_T    cursor_save;
  412.       pos_T    *trypos;
  413. --- 6522,6528 ----
  414.   /* }        */
  415.   
  416.       static pos_T *
  417. ! find_start_brace()        /* XXX */
  418.   {
  419.       pos_T    cursor_save;
  420.       pos_T    *trypos;
  421. ***************
  422. *** 6543,6549 ****
  423.       pos = NULL;
  424.       /* ignore the { if it's in a // or / *  * / comment */
  425.       if ((colnr_T)cin_skip2pos(trypos) == trypos->col
  426. !         && (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */
  427.           break;
  428.       if (pos != NULL)
  429.           curwin->w_cursor.lnum = pos->lnum;
  430. --- 6538,6544 ----
  431.       pos = NULL;
  432.       /* ignore the { if it's in a // or / *  * / comment */
  433.       if ((colnr_T)cin_skip2pos(trypos) == trypos->col
  434. !                && (pos = ind_find_start_comment()) == NULL) /* XXX */
  435.           break;
  436.       if (pos != NULL)
  437.           curwin->w_cursor.lnum = pos->lnum;
  438. ***************
  439. *** 6557,6565 ****
  440.    * Return NULL if no match found.
  441.    */
  442.       static pos_T *
  443. ! find_match_paren(ind_maxparen, ind_maxcomment)        /* XXX */
  444.       int        ind_maxparen;
  445. -     int        ind_maxcomment;
  446.   {
  447.       pos_T    cursor_save;
  448.       pos_T    *trypos;
  449. --- 6552,6559 ----
  450.    * Return NULL if no match found.
  451.    */
  452.       static pos_T *
  453. ! find_match_paren(ind_maxparen)        /* XXX */
  454.       int        ind_maxparen;
  455.   {
  456.       pos_T    cursor_save;
  457.       pos_T    *trypos;
  458. ***************
  459. *** 6576,6582 ****
  460.           pos_copy = *trypos;        /* copy trypos, findmatch will change it */
  461.           trypos = &pos_copy;
  462.           curwin->w_cursor = *trypos;
  463. !         if (find_start_comment(ind_maxcomment) != NULL) /* XXX */
  464.           trypos = NULL;
  465.       }
  466.       }
  467. --- 6570,6576 ----
  468.           pos_copy = *trypos;        /* copy trypos, findmatch will change it */
  469.           trypos = &pos_copy;
  470.           curwin->w_cursor = *trypos;
  471. !         if (ind_find_start_comment() != NULL) /* XXX */
  472.           trypos = NULL;
  473.       }
  474.       }
  475. ***************
  476. *** 6591,6605 ****
  477.    * looking a few lines further.
  478.    */
  479.       static int
  480. ! corr_ind_maxparen(ind_maxparen, startpos)
  481. !     int        ind_maxparen;
  482.       pos_T    *startpos;
  483.   {
  484.       long    n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
  485.   
  486. !     if (n > 0 && n < ind_maxparen / 2)
  487. !     return ind_maxparen - (int)n;
  488. !     return ind_maxparen;
  489.   }
  490.   
  491.   /*
  492. --- 6585,6598 ----
  493.    * looking a few lines further.
  494.    */
  495.       static int
  496. ! corr_ind_maxparen(startpos)
  497.       pos_T    *startpos;
  498.   {
  499.       long    n = (long)startpos->lnum - (long)curwin->w_cursor.lnum;
  500.   
  501. !     if (n > 0 && n < curbuf->b_ind_maxparen / 2)
  502. !     return curbuf->b_ind_maxparen - (int)n;
  503. !     return curbuf->b_ind_maxparen;
  504.   }
  505.   
  506.   /*
  507. ***************
  508. *** 6937,6943 ****
  509.   
  510.       curwin->w_cursor.col = 0;
  511.   
  512. !     original_line_islabel = cin_islabel(curbuf->b_ind_maxcomment);  /* XXX */
  513.   
  514.       /*
  515.        * #defines and so on always go at the left when included in 'cinkeys'.
  516. --- 6930,6936 ----
  517.   
  518.       curwin->w_cursor.col = 0;
  519.   
  520. !     original_line_islabel = cin_islabel();  /* XXX */
  521.   
  522.       /*
  523.        * #defines and so on always go at the left when included in 'cinkeys'.
  524. ***************
  525. *** 6973,6979 ****
  526.        * comment, try using the 'comments' option.
  527.        */
  528.       else if (!cin_iscomment(theline)
  529. !         && (trypos = find_start_comment(curbuf->b_ind_maxcomment)) != NULL)
  530.       /* XXX */
  531.       {
  532.       int    lead_start_len = 2;
  533. --- 6966,6972 ----
  534.        * comment, try using the 'comments' option.
  535.        */
  536.       else if (!cin_iscomment(theline)
  537. !                    && (trypos = ind_find_start_comment()) != NULL)
  538.       /* XXX */
  539.       {
  540.       int    lead_start_len = 2;
  541. ***************
  542. *** 7126,7136 ****
  543.       /*
  544.        * Are we inside parentheses or braces?
  545.        */                            /* XXX */
  546. !     else if (((trypos = find_match_paren(curbuf->b_ind_maxparen,
  547. !                         curbuf->b_ind_maxcomment)) != NULL
  548.           && curbuf->b_ind_java == 0)
  549. !         || (tryposBrace =
  550. !                find_start_brace(curbuf->b_ind_maxcomment)) != NULL
  551.           || trypos != NULL)
  552.       {
  553.         if (trypos != NULL && tryposBrace != NULL)
  554. --- 7119,7127 ----
  555.       /*
  556.        * Are we inside parentheses or braces?
  557.        */                            /* XXX */
  558. !     else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL
  559.           && curbuf->b_ind_java == 0)
  560. !         || (tryposBrace = find_start_brace()) != NULL
  561.           || trypos != NULL)
  562.       {
  563.         if (trypos != NULL && tryposBrace != NULL)
  564. ***************
  565. *** 7170,7177 ****
  566.           curwin->w_cursor.lnum = lnum;
  567.   
  568.           /* Skip a comment. XXX */
  569. !         if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
  570. !                                       != NULL)
  571.           {
  572.               lnum = trypos->lnum + 1;
  573.               continue;
  574. --- 7161,7167 ----
  575.           curwin->w_cursor.lnum = lnum;
  576.   
  577.           /* Skip a comment. XXX */
  578. !         if ((trypos = ind_find_start_comment()) != NULL)
  579.           {
  580.               lnum = trypos->lnum + 1;
  581.               continue;
  582. ***************
  583. *** 7179,7186 ****
  584.   
  585.           /* XXX */
  586.           if ((trypos = find_match_paren(
  587. !                corr_ind_maxparen(curbuf->b_ind_maxparen, &cur_curpos),
  588. !                         curbuf->b_ind_maxcomment)) != NULL
  589.               && trypos->lnum == our_paren_pos.lnum
  590.               && trypos->col == our_paren_pos.col)
  591.           {
  592. --- 7169,7175 ----
  593.   
  594.           /* XXX */
  595.           if ((trypos = find_match_paren(
  596. !             corr_ind_maxparen(&cur_curpos))) != NULL
  597.               && trypos->lnum == our_paren_pos.lnum
  598.               && trypos->col == our_paren_pos.col)
  599.           {
  600. ***************
  601. *** 7223,7230 ****
  602.               curwin->w_cursor.lnum = outermost.lnum;
  603.               curwin->w_cursor.col = outermost.col;
  604.   
  605. !             trypos = find_match_paren(curbuf->b_ind_maxparen,
  606. !                             curbuf->b_ind_maxcomment);
  607.           } while (trypos && trypos->lnum == outermost.lnum);
  608.   
  609.           curwin->w_cursor = cursor_save;
  610. --- 7212,7218 ----
  611.               curwin->w_cursor.lnum = outermost.lnum;
  612.               curwin->w_cursor.col = outermost.col;
  613.   
  614. !             trypos = find_match_paren(curbuf->b_ind_maxparen);
  615.           } while (trypos && trypos->lnum == outermost.lnum);
  616.   
  617.           curwin->w_cursor = cursor_save;
  618. ***************
  619. *** 7235,7242 ****
  620.               cin_is_if_for_while_before_offset(line, &outermost.col);
  621.           }
  622.   
  623. !         amount = skip_label(our_paren_pos.lnum, &look,
  624. !                             curbuf->b_ind_maxcomment);
  625.           look = skipwhite(look);
  626.           if (*look == '(')
  627.           {
  628. --- 7223,7229 ----
  629.               cin_is_if_for_while_before_offset(line, &outermost.col);
  630.           }
  631.   
  632. !         amount = skip_label(our_paren_pos.lnum, &look);
  633.           look = skipwhite(look);
  634.           if (*look == '(')
  635.           {
  636. ***************
  637. *** 7366,7373 ****
  638.           {
  639.               curwin->w_cursor.lnum = our_paren_pos.lnum;
  640.               curwin->w_cursor.col = col;
  641. !             if (find_match_paren(curbuf->b_ind_maxparen,
  642. !                         curbuf->b_ind_maxcomment) != NULL)
  643.               amount += curbuf->b_ind_unclosed2;
  644.               else
  645.               {
  646. --- 7353,7359 ----
  647.           {
  648.               curwin->w_cursor.lnum = our_paren_pos.lnum;
  649.               curwin->w_cursor.col = col;
  650. !             if (find_match_paren(curbuf->b_ind_maxparen) != NULL)
  651.               amount += curbuf->b_ind_unclosed2;
  652.               else
  653.               {
  654. ***************
  655. *** 7435,7442 ****
  656.            */
  657.           lnum = ourscope;
  658.           if (find_last_paren(start, '(', ')')
  659. !             && (trypos = find_match_paren(curbuf->b_ind_maxparen,
  660. !                        curbuf->b_ind_maxcomment)) != NULL)
  661.           lnum = trypos->lnum;
  662.   
  663.           /*
  664. --- 7421,7428 ----
  665.            */
  666.           lnum = ourscope;
  667.           if (find_last_paren(start, '(', ')')
  668. !             && (trypos = find_match_paren(curbuf->b_ind_maxparen))
  669. !                                       != NULL)
  670.           lnum = trypos->lnum;
  671.   
  672.           /*
  673. ***************
  674. *** 7449,7455 ****
  675.                  && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
  676.           amount = get_indent();
  677.           else
  678. !         amount = skip_label(lnum, &l, curbuf->b_ind_maxcomment);
  679.   
  680.           start_brace = BRACE_AT_END;
  681.       }
  682. --- 7435,7441 ----
  683.                  && cin_iscase(skipwhite(ml_get_curline()), FALSE)))
  684.           amount = get_indent();
  685.           else
  686. !         amount = skip_label(lnum, &l);
  687.   
  688.           start_brace = BRACE_AT_END;
  689.       }
  690. ***************
  691. *** 7478,7491 ****
  692.           lookfor = LOOKFOR_INITIAL;
  693.           if (cin_iselse(theline))
  694.           lookfor = LOOKFOR_IF;
  695. !         else if (cin_iswhileofdo(theline, cur_curpos.lnum,
  696. !                         curbuf->b_ind_maxparen)) /* XXX */
  697.           lookfor = LOOKFOR_DO;
  698.           if (lookfor != LOOKFOR_INITIAL)
  699.           {
  700.           curwin->w_cursor.lnum = cur_curpos.lnum;
  701. !         if (find_match(lookfor, ourscope, curbuf->b_ind_maxparen,
  702. !                           curbuf->b_ind_maxcomment) == OK)
  703.           {
  704.               amount = get_indent();    /* XXX */
  705.               goto theend;
  706. --- 7464,7475 ----
  707.           lookfor = LOOKFOR_INITIAL;
  708.           if (cin_iselse(theline))
  709.           lookfor = LOOKFOR_IF;
  710. !         else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */
  711.           lookfor = LOOKFOR_DO;
  712.           if (lookfor != LOOKFOR_INITIAL)
  713.           {
  714.           curwin->w_cursor.lnum = cur_curpos.lnum;
  715. !         if (find_match(lookfor, ourscope) == OK)
  716.           {
  717.               amount = get_indent();    /* XXX */
  718.               goto theend;
  719. ***************
  720. *** 7611,7617 ****
  721.                * If we're in a comment now, skip to the start of the
  722.                * comment.
  723.                */
  724. !             trypos = find_start_comment(curbuf->b_ind_maxcomment);
  725.               if (trypos != NULL)
  726.               {
  727.                   curwin->w_cursor.lnum = trypos->lnum + 1;
  728. --- 7595,7601 ----
  729.                * If we're in a comment now, skip to the start of the
  730.                * comment.
  731.                */
  732. !             trypos = ind_find_start_comment();
  733.               if (trypos != NULL)
  734.               {
  735.                   curwin->w_cursor.lnum = trypos->lnum + 1;
  736. ***************
  737. *** 7636,7644 ****
  738.                * (it's a variable declaration).
  739.                */
  740.               if (start_brace != BRACE_IN_COL0
  741. !                 || !cin_isfuncdecl(&l, curwin->w_cursor.lnum,
  742. !                          0, curbuf->b_ind_maxparen,
  743. !                             curbuf->b_ind_maxcomment))
  744.               {
  745.                   /* if the line is terminated with another ','
  746.                    * it is a continued variable initialization.
  747. --- 7620,7626 ----
  748.                * (it's a variable declaration).
  749.                */
  750.               if (start_brace != BRACE_IN_COL0
  751. !                  || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
  752.               {
  753.                   /* if the line is terminated with another ','
  754.                    * it is a continued variable initialization.
  755. ***************
  756. *** 7670,7681 ****
  757.                   trypos = NULL;
  758.                   if (find_last_paren(l, '(', ')'))
  759.                   trypos = find_match_paren(
  760. !                         curbuf->b_ind_maxparen,
  761. !                         curbuf->b_ind_maxcomment);
  762.   
  763.                   if (trypos == NULL && find_last_paren(l, '{', '}'))
  764. !                 trypos = find_start_brace(
  765. !                             curbuf->b_ind_maxcomment);
  766.   
  767.                   if (trypos != NULL)
  768.                   {
  769. --- 7652,7661 ----
  770.                   trypos = NULL;
  771.                   if (find_last_paren(l, '(', ')'))
  772.                   trypos = find_match_paren(
  773. !                               curbuf->b_ind_maxparen);
  774.   
  775.                   if (trypos == NULL && find_last_paren(l, '{', '}'))
  776. !                 trypos = find_start_brace();
  777.   
  778.                   if (trypos != NULL)
  779.                   {
  780. ***************
  781. *** 7733,7740 ****
  782.   
  783.                   /* If we're in a comment now, skip to the start of
  784.                    * the comment. */
  785. !                 trypos = find_start_comment(
  786. !                             curbuf->b_ind_maxcomment);
  787.                   if (trypos != NULL)
  788.                   {
  789.                   curwin->w_cursor.lnum = trypos->lnum + 1;
  790. --- 7713,7719 ----
  791.   
  792.                   /* If we're in a comment now, skip to the start of
  793.                    * the comment. */
  794. !                 trypos = ind_find_start_comment();
  795.                   if (trypos != NULL)
  796.                   {
  797.                   curwin->w_cursor.lnum = trypos->lnum + 1;
  798. ***************
  799. *** 7764,7771 ****
  800.           /*
  801.            * If we're in a comment now, skip to the start of the comment.
  802.            */                        /* XXX */
  803. !         if ((trypos = find_start_comment(curbuf->b_ind_maxcomment))
  804. !                                       != NULL)
  805.           {
  806.               curwin->w_cursor.lnum = trypos->lnum + 1;
  807.               curwin->w_cursor.col = 0;
  808. --- 7743,7749 ----
  809.           /*
  810.            * If we're in a comment now, skip to the start of the comment.
  811.            */                        /* XXX */
  812. !         if ((trypos = ind_find_start_comment()) != NULL)
  813.           {
  814.               curwin->w_cursor.lnum = trypos->lnum + 1;
  815.               curwin->w_cursor.col = 0;
  816. ***************
  817. *** 7819,7826 ****
  818.                * Check that this case label is not for another
  819.                * switch()
  820.                */                    /* XXX */
  821. !             if ((trypos = find_start_brace(
  822. !                         curbuf->b_ind_maxcomment)) == NULL
  823.                             || trypos->lnum == ourscope)
  824.               {
  825.                   amount = get_indent();    /* XXX */
  826. --- 7797,7803 ----
  827.                * Check that this case label is not for another
  828.                * switch()
  829.                */                    /* XXX */
  830. !             if ((trypos = find_start_brace()) == NULL
  831.                             || trypos->lnum == ourscope)
  832.               {
  833.                   amount = get_indent();    /* XXX */
  834. ***************
  835. *** 7894,7901 ****
  836.            */
  837.           if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
  838.           {
  839. !             if (find_last_paren(l, '{', '}') && (trypos =
  840. !               find_start_brace(curbuf->b_ind_maxcomment)) != NULL)
  841.               {
  842.               curwin->w_cursor.lnum = trypos->lnum + 1;
  843.               curwin->w_cursor.col = 0;
  844. --- 7871,7878 ----
  845.            */
  846.           if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL)
  847.           {
  848. !             if (find_last_paren(l, '{', '}')
  849. !                      && (trypos = find_start_brace()) != NULL)
  850.               {
  851.               curwin->w_cursor.lnum = trypos->lnum + 1;
  852.               curwin->w_cursor.col = 0;
  853. ***************
  854. *** 7906,7912 ****
  855.           /*
  856.            * Ignore jump labels with nothing after them.
  857.            */
  858. !         if (!curbuf->b_ind_js && cin_islabel(curbuf->b_ind_maxcomment))
  859.           {
  860.               l = after_label(ml_get_curline());
  861.               if (l == NULL || cin_nocode(l))
  862. --- 7883,7889 ----
  863.           /*
  864.            * Ignore jump labels with nothing after them.
  865.            */
  866. !         if (!curbuf->b_ind_js && cin_islabel())
  867.           {
  868.               l = after_label(ml_get_curline());
  869.               if (l == NULL || cin_nocode(l))
  870. ***************
  871. *** 7952,7961 ****
  872.               }
  873.               else
  874.                                        /* XXX */
  875. !             amount = get_baseclass_amount(col,
  876. !                            curbuf->b_ind_maxparen,
  877. !                            curbuf->b_ind_maxcomment,
  878. !                            curbuf->b_ind_cpp_baseclass);
  879.               break;
  880.           }
  881.           else if (lookfor == LOOKFOR_CPP_BASECLASS)
  882. --- 7929,7935 ----
  883.               }
  884.               else
  885.                                        /* XXX */
  886. !             amount = get_baseclass_amount(col);
  887.               break;
  888.           }
  889.           else if (lookfor == LOOKFOR_CPP_BASECLASS)
  890. ***************
  891. *** 7997,8005 ****
  892.                * matching it will take us back to the start of the line.
  893.                */
  894.               (void)find_last_paren(l, '(', ')');
  895. !             trypos = find_match_paren(
  896. !                  corr_ind_maxparen(curbuf->b_ind_maxparen,
  897. !                       &cur_curpos), curbuf->b_ind_maxcomment);
  898.   
  899.               /*
  900.                * If we are looking for ',', we also look for matching
  901. --- 7971,7977 ----
  902.                * matching it will take us back to the start of the line.
  903.                */
  904.               (void)find_last_paren(l, '(', ')');
  905. !             trypos = find_match_paren(corr_ind_maxparen(&cur_curpos));
  906.   
  907.               /*
  908.                * If we are looking for ',', we also look for matching
  909. ***************
  910. *** 8007,8013 ****
  911.                */
  912.               if (trypos == NULL && terminated == ','
  913.                             && find_last_paren(l, '{', '}'))
  914. !             trypos = find_start_brace(curbuf->b_ind_maxcomment);
  915.   
  916.               if (trypos != NULL)
  917.               {
  918. --- 7979,7985 ----
  919.                */
  920.               if (trypos == NULL && terminated == ','
  921.                             && find_last_paren(l, '{', '}'))
  922. !             trypos = find_start_brace();
  923.   
  924.               if (trypos != NULL)
  925.               {
  926. ***************
  927. *** 8051,8058 ****
  928.                * ignoring any jump label.        XXX
  929.                */
  930.               if (!curbuf->b_ind_js)
  931. !             cur_amount = skip_label(curwin->w_cursor.lnum,
  932. !                         &l, curbuf->b_ind_maxcomment);
  933.               else
  934.               cur_amount = get_indent();
  935.               /*
  936. --- 8023,8029 ----
  937.                * ignoring any jump label.        XXX
  938.                */
  939.               if (!curbuf->b_ind_js)
  940. !             cur_amount = skip_label(curwin->w_cursor.lnum, &l);
  941.               else
  942.               cur_amount = get_indent();
  943.               /*
  944. ***************
  945. *** 8162,8172 ****
  946.                   curwin->w_cursor.col =
  947.                         (colnr_T)(l - ml_get_curline()) + 1;
  948.   
  949. !                 if ((trypos = find_start_brace(
  950. !                         curbuf->b_ind_maxcomment)) == NULL
  951. !                     || find_match(LOOKFOR_IF, trypos->lnum,
  952. !                         curbuf->b_ind_maxparen,
  953. !                         curbuf->b_ind_maxcomment) == FAIL)
  954.                   break;
  955.               }
  956.               }
  957. --- 8133,8141 ----
  958.                   curwin->w_cursor.col =
  959.                         (colnr_T)(l - ml_get_curline()) + 1;
  960.   
  961. !                 if ((trypos = find_start_brace()) == NULL
  962. !                        || find_match(LOOKFOR_IF, trypos->lnum)
  963. !                                       == FAIL)
  964.                   break;
  965.               }
  966.               }
  967. ***************
  968. *** 8261,8268 ****
  969.            * If so: Ignore until the matching "do".
  970.            */
  971.                               /* XXX */
  972. !         else if (cin_iswhileofdo_end(terminated, curbuf->b_ind_maxparen,
  973. !                             curbuf->b_ind_maxcomment))
  974.           {
  975.               /*
  976.                * Found an unterminated line after a while ();, line up
  977. --- 8230,8236 ----
  978.            * If so: Ignore until the matching "do".
  979.            */
  980.                               /* XXX */
  981. !         else if (cin_iswhileofdo_end(terminated))
  982.           {
  983.               /*
  984.                * Found an unterminated line after a while ();, line up
  985. ***************
  986. *** 8380,8387 ****
  987.               l = ml_get_curline();
  988.               if (find_last_paren(l, '(', ')')
  989.                   && (trypos = find_match_paren(
  990. !                        curbuf->b_ind_maxparen,
  991. !                        curbuf->b_ind_maxcomment)) != NULL)
  992.               {
  993.                   /*
  994.                    * Check if we are on a case label now.  This is
  995. --- 8348,8354 ----
  996.               l = ml_get_curline();
  997.               if (find_last_paren(l, '(', ')')
  998.                   && (trypos = find_match_paren(
  999. !                        curbuf->b_ind_maxparen)) != NULL)
  1000.               {
  1001.                   /*
  1002.                    * Check if we are on a case label now.  This is
  1003. ***************
  1004. *** 8415,8422 ****
  1005.                * Get indent and pointer to text for current line,
  1006.                * ignoring any jump label.
  1007.                */
  1008. !             amount = skip_label(curwin->w_cursor.lnum,
  1009. !                         &l, curbuf->b_ind_maxcomment);
  1010.   
  1011.               if (theline[0] == '{')
  1012.                   amount += curbuf->b_ind_open_extra;
  1013. --- 8382,8388 ----
  1014.                * Get indent and pointer to text for current line,
  1015.                * ignoring any jump label.
  1016.                */
  1017. !             amount = skip_label(curwin->w_cursor.lnum, &l);
  1018.   
  1019.               if (theline[0] == '{')
  1020.                   amount += curbuf->b_ind_open_extra;
  1021. ***************
  1022. *** 8439,8449 ****
  1023.                   && cin_iselse(l)
  1024.                   && whilelevel == 0)
  1025.               {
  1026. !                 if ((trypos = find_start_brace(
  1027. !                         curbuf->b_ind_maxcomment)) == NULL
  1028. !                     || find_match(LOOKFOR_IF, trypos->lnum,
  1029. !                         curbuf->b_ind_maxparen,
  1030. !                         curbuf->b_ind_maxcomment) == FAIL)
  1031.                   break;
  1032.                   continue;
  1033.               }
  1034. --- 8405,8413 ----
  1035.                   && cin_iselse(l)
  1036.                   && whilelevel == 0)
  1037.               {
  1038. !                 if ((trypos = find_start_brace()) == NULL
  1039. !                        || find_match(LOOKFOR_IF, trypos->lnum)
  1040. !                                       == FAIL)
  1041.                   break;
  1042.                   continue;
  1043.               }
  1044. ***************
  1045. *** 8453,8461 ****
  1046.                * that block.
  1047.                */
  1048.               l = ml_get_curline();
  1049. !             if (find_last_paren(l, '{', '}')
  1050. !                 && (trypos = find_start_brace(
  1051. !                  curbuf->b_ind_maxcomment)) != NULL) /* XXX */
  1052.               {
  1053.                   curwin->w_cursor = *trypos;
  1054.                   /* if not "else {" check for terminated again */
  1055. --- 8417,8424 ----
  1056.                * that block.
  1057.                */
  1058.               l = ml_get_curline();
  1059. !             if (find_last_paren(l, '{', '}') /* XXX */
  1060. !                      && (trypos = find_start_brace()) != NULL)
  1061.               {
  1062.                   curwin->w_cursor = *trypos;
  1063.                   /* if not "else {" check for terminated again */
  1064. ***************
  1065. *** 8516,8524 ****
  1066.           && !cin_ends_in(theline, (char_u *)":", NULL)
  1067.           && !cin_ends_in(theline, (char_u *)",", NULL)
  1068.           && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
  1069. !                   cur_curpos.lnum + 1,
  1070. !                   curbuf->b_ind_maxparen,
  1071. !                   curbuf->b_ind_maxcomment)
  1072.           && !cin_isterminated(theline, FALSE, TRUE))
  1073.       {
  1074.           amount = curbuf->b_ind_func_type;
  1075. --- 8479,8485 ----
  1076.           && !cin_ends_in(theline, (char_u *)":", NULL)
  1077.           && !cin_ends_in(theline, (char_u *)",", NULL)
  1078.           && cin_isfuncdecl(NULL, cur_curpos.lnum + 1,
  1079. !                   cur_curpos.lnum + 1)
  1080.           && !cin_isterminated(theline, FALSE, TRUE))
  1081.       {
  1082.           amount = curbuf->b_ind_func_type;
  1083. ***************
  1084. *** 8540,8547 ****
  1085.           /*
  1086.            * If we're in a comment now, skip to the start of the comment.
  1087.            */                        /* XXX */
  1088. !         if ((trypos = find_start_comment(
  1089. !                        curbuf->b_ind_maxcomment)) != NULL)
  1090.           {
  1091.               curwin->w_cursor.lnum = trypos->lnum + 1;
  1092.               curwin->w_cursor.col = 0;
  1093. --- 8501,8507 ----
  1094.           /*
  1095.            * If we're in a comment now, skip to the start of the comment.
  1096.            */                        /* XXX */
  1097. !         if ((trypos = ind_find_start_comment()) != NULL)
  1098.           {
  1099.               curwin->w_cursor.lnum = trypos->lnum + 1;
  1100.               curwin->w_cursor.col = 0;
  1101. ***************
  1102. *** 8561,8569 ****
  1103.           if (n)
  1104.           {
  1105.                                        /* XXX */
  1106. !             amount = get_baseclass_amount(col, curbuf->b_ind_maxparen,
  1107. !                        curbuf->b_ind_maxcomment,
  1108. !                        curbuf->b_ind_cpp_baseclass);
  1109.               break;
  1110.           }
  1111.   
  1112. --- 8521,8527 ----
  1113.           if (n)
  1114.           {
  1115.                                        /* XXX */
  1116. !             amount = get_baseclass_amount(col);
  1117.               break;
  1118.           }
  1119.   
  1120. ***************
  1121. *** 8595,8602 ****
  1122.               /* take us back to opening paren */
  1123.               if (find_last_paren(l, '(', ')')
  1124.                   && (trypos = find_match_paren(
  1125. !                        curbuf->b_ind_maxparen,
  1126. !                        curbuf->b_ind_maxcomment)) != NULL)
  1127.               curwin->w_cursor = *trypos;
  1128.   
  1129.               /* For a line ending in ',' that is a continuation line go
  1130. --- 8553,8559 ----
  1131.               /* take us back to opening paren */
  1132.               if (find_last_paren(l, '(', ')')
  1133.                   && (trypos = find_match_paren(
  1134. !                          curbuf->b_ind_maxparen)) != NULL)
  1135.               curwin->w_cursor = *trypos;
  1136.   
  1137.               /* For a line ending in ',' that is a continuation line go
  1138. ***************
  1139. *** 8627,8635 ****
  1140.            * If the line looks like a function declaration, and we're
  1141.            * not in a comment, put it the left margin.
  1142.            */
  1143. !         if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0,
  1144. !                    curbuf->b_ind_maxparen,
  1145. !                    curbuf->b_ind_maxcomment))  /* XXX */
  1146.               break;
  1147.           l = ml_get_curline();
  1148.   
  1149. --- 8584,8590 ----
  1150.            * If the line looks like a function declaration, and we're
  1151.            * not in a comment, put it the left margin.
  1152.            */
  1153. !         if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0))  /* XXX */
  1154.               break;
  1155.           l = ml_get_curline();
  1156.   
  1157. ***************
  1158. *** 8677,8685 ****
  1159.            * line (and the ones that follow) needs to be indented as
  1160.            * parameters.
  1161.            */
  1162. !         if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0,
  1163. !                    curbuf->b_ind_maxparen,
  1164. !                    curbuf->b_ind_maxcomment))
  1165.           {
  1166.               amount = curbuf->b_ind_param;
  1167.               break;
  1168. --- 8632,8638 ----
  1169.            * line (and the ones that follow) needs to be indented as
  1170.            * parameters.
  1171.            */
  1172. !         if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0))
  1173.           {
  1174.               amount = curbuf->b_ind_param;
  1175.               break;
  1176. ***************
  1177. *** 8710,8717 ****
  1178.            */
  1179.           find_last_paren(l, '(', ')');
  1180.   
  1181. !         if ((trypos = find_match_paren(curbuf->b_ind_maxparen,
  1182. !                        curbuf->b_ind_maxcomment)) != NULL)
  1183.               curwin->w_cursor = *trypos;
  1184.           amount = get_indent();        /* XXX */
  1185.           break;
  1186. --- 8663,8669 ----
  1187.            */
  1188.           find_last_paren(l, '(', ')');
  1189.   
  1190. !         if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL)
  1191.               curwin->w_cursor = *trypos;
  1192.           amount = get_indent();        /* XXX */
  1193.           break;
  1194. ***************
  1195. *** 8754,8764 ****
  1196.   }
  1197.   
  1198.       static int
  1199. ! find_match(lookfor, ourscope, ind_maxparen, ind_maxcomment)
  1200.       int        lookfor;
  1201.       linenr_T    ourscope;
  1202. -     int        ind_maxparen;
  1203. -     int        ind_maxcomment;
  1204.   {
  1205.       char_u    *look;
  1206.       pos_T    *theirscope;
  1207. --- 8706,8714 ----
  1208.   }
  1209.   
  1210.       static int
  1211. ! find_match(lookfor, ourscope)
  1212.       int        lookfor;
  1213.       linenr_T    ourscope;
  1214.   {
  1215.       char_u    *look;
  1216.       pos_T    *theirscope;
  1217. ***************
  1218. *** 8788,8800 ****
  1219.       if (cin_iselse(look)
  1220.           || cin_isif(look)
  1221.           || cin_isdo(look)                /* XXX */
  1222. !         || cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen))
  1223.       {
  1224.           /*
  1225.            * if we've gone outside the braces entirely,
  1226.            * we must be out of scope...
  1227.            */
  1228. !         theirscope = find_start_brace(ind_maxcomment);  /* XXX */
  1229.           if (theirscope == NULL)
  1230.           break;
  1231.   
  1232. --- 8738,8750 ----
  1233.       if (cin_iselse(look)
  1234.           || cin_isif(look)
  1235.           || cin_isdo(look)                /* XXX */
  1236. !         || cin_iswhileofdo(look, curwin->w_cursor.lnum))
  1237.       {
  1238.           /*
  1239.            * if we've gone outside the braces entirely,
  1240.            * we must be out of scope...
  1241.            */
  1242. !         theirscope = find_start_brace();  /* XXX */
  1243.           if (theirscope == NULL)
  1244.           break;
  1245.   
  1246. ***************
  1247. *** 8832,8838 ****
  1248.            * if it was a "while" then we need to go back to
  1249.            * another "do", so increment whilelevel.  XXX
  1250.            */
  1251. !         if (cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen))
  1252.           {
  1253.           ++whilelevel;
  1254.           continue;
  1255. --- 8782,8788 ----
  1256.            * if it was a "while" then we need to go back to
  1257.            * another "do", so increment whilelevel.  XXX
  1258.            */
  1259. !         if (cin_iswhileofdo(look, curwin->w_cursor.lnum))
  1260.           {
  1261.           ++whilelevel;
  1262.           continue;
  1263. *** ../vim-7.4.070/src/proto/misc1.pro    2013-11-05 07:12:59.000000000 +0100
  1264. --- src/proto/misc1.pro    2013-11-06 03:19:45.000000000 +0100
  1265. ***************
  1266. *** 81,87 ****
  1267.   char_u *FullName_save __ARGS((char_u *fname, int force));
  1268.   pos_T *find_start_comment __ARGS((int ind_maxcomment));
  1269.   void do_c_expr_indent __ARGS((void));
  1270. ! int cin_islabel __ARGS((int ind_maxcomment));
  1271.   int cin_iscase __ARGS((char_u *s, int strict));
  1272.   int cin_isscopedecl __ARGS((char_u *s));
  1273.   void parse_cino __ARGS((buf_T *buf));
  1274. --- 81,87 ----
  1275.   char_u *FullName_save __ARGS((char_u *fname, int force));
  1276.   pos_T *find_start_comment __ARGS((int ind_maxcomment));
  1277.   void do_c_expr_indent __ARGS((void));
  1278. ! int cin_islabel __ARGS((void));
  1279.   int cin_iscase __ARGS((char_u *s, int strict));
  1280.   int cin_isscopedecl __ARGS((char_u *s));
  1281.   void parse_cino __ARGS((buf_T *buf));
  1282. *** ../vim-7.4.070/src/version.c    2013-11-05 17:40:47.000000000 +0100
  1283. --- src/version.c    2013-11-06 03:43:44.000000000 +0100
  1284. ***************
  1285. *** 740,741 ****
  1286. --- 740,743 ----
  1287.   {   /* Add new patch number below this line */
  1288. + /**/
  1289. +     71,
  1290.   /**/
  1291.  
  1292. -- 
  1293. A law to reduce crime states: "It is mandatory for a motorist with criminal
  1294. intentions to stop at the city limits and telephone the chief of police as he
  1295. is entering the town.
  1296.         [real standing law in Washington, United States of America]
  1297.  
  1298.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  1299. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  1300. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  1301.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  1302.