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 / 6.1.280 < prev    next >
Encoding:
Internet Message Format  |  2003-01-05  |  3.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.280
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.280
  11. Problem:    It's possible to use an argument "firstline" or "lastline" for a
  12.         function but using "a:firstline" or "a:lastline" in the function
  13.         won't work.  (Benji Fisher)
  14. Solution:   Give an error message for these arguments.
  15.         Also avoid that the following function body causes a whole row of
  16.         errors, skip over it after an error in the first line.
  17. Files:        src/eval.c
  18.  
  19.  
  20. *** ../vim61.279/src/eval.c    Sun Jan  5 22:14:46 2003
  21. --- src/eval.c    Mon Jan  6 22:34:33 2003
  22. ***************
  23. *** 7878,7889 ****
  24.           arg = p;
  25.           while (ASCII_ISALPHA(*p) || isdigit(*p) || *p == '_')
  26.           ++p;
  27. !         if (arg == p || isdigit(*arg))
  28.           {
  29. !         if (eap->skip)
  30. !             break;
  31. !         EMSG2(_("E125: Illegal argument: %s"), arg);
  32. !         goto erret;
  33.           }
  34.           if (ga_grow(&newargs, 1) == FAIL)
  35.           goto erret;
  36. --- 7893,7905 ----
  37.           arg = p;
  38.           while (ASCII_ISALPHA(*p) || isdigit(*p) || *p == '_')
  39.           ++p;
  40. !         if (arg == p || isdigit(*arg)
  41. !             || (p - arg == 9 && STRNCMP(arg, "firstline", 9) == 0)
  42. !             || (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0))
  43.           {
  44. !         if (!eap->skip)
  45. !             EMSG2(_("E125: Illegal argument: %s"), arg);
  46. !         break;
  47.           }
  48.           if (ga_grow(&newargs, 1) == FAIL)
  49.           goto erret;
  50. ***************
  51. *** 7904,7913 ****
  52.       p = skipwhite(p);
  53.       if (mustend && *p != ')')
  54.       {
  55. !         if (eap->skip)
  56. !         break;
  57. !         EMSG2(_(e_invarg2), eap->arg);
  58. !         goto erret;
  59.       }
  60.       }
  61.       ++p;    /* skip the ')' */
  62. --- 7920,7928 ----
  63.       p = skipwhite(p);
  64.       if (mustend && *p != ')')
  65.       {
  66. !         if (!eap->skip)
  67. !         EMSG2(_(e_invarg2), eap->arg);
  68. !         break;
  69.       }
  70.       }
  71.       ++p;    /* skip the ')' */
  72. ***************
  73. *** 7930,7940 ****
  74.           break;
  75.       }
  76.   
  77. !     if (*p != NUL && *p != '"' && *p != '\n' && !eap->skip)
  78. !     {
  79.       EMSG(_(e_trailing));
  80. -     goto erret;
  81. -     }
  82.   
  83.       /*
  84.        * Read the body of the function, until ":endfunction" is found.
  85. --- 7945,7952 ----
  86.           break;
  87.       }
  88.   
  89. !     if (*p != NUL && *p != '"' && *p != '\n' && !eap->skip && !did_emsg)
  90.       EMSG(_(e_trailing));
  91.   
  92.       /*
  93.        * Read the body of the function, until ":endfunction" is found.
  94. ***************
  95. *** 7945,7954 ****
  96.        * whole function before telling him it doesn't work!  For a script we
  97.        * need to skip the body to be able to find what follows. */
  98.       if (!eap->skip && !eap->forceit && find_func(name) != NULL)
  99. -     {
  100.           EMSG2(_(e_funcexts), name);
  101. -         goto erret;
  102. -     }
  103.   
  104.       msg_putchar('\n');        /* don't overwrite the function name */
  105.       cmdline_row = msg_row;
  106. --- 7957,7963 ----
  107. ***************
  108. *** 8031,8037 ****
  109.       newlines.ga_room--;
  110.       }
  111.   
  112. !     if (eap->skip)
  113.       goto erret;
  114.   
  115.       /*
  116. --- 8040,8048 ----
  117.       newlines.ga_room--;
  118.       }
  119.   
  120. !     /* Don't define the function when skipping commands or when an error was
  121. !      * detected. */
  122. !     if (eap->skip || did_emsg)
  123.       goto erret;
  124.   
  125.       /*
  126. *** ../vim61.279/src/version.c    Mon Jan  6 21:55:57 2003
  127. --- src/version.c    Mon Jan  6 22:48:39 2003
  128. ***************
  129. *** 608,609 ****
  130. --- 608,611 ----
  131.   {   /* Add new patch number below this line */
  132. + /**/
  133. +     280,
  134.   /**/
  135.  
  136. -- 
  137. MORTICIAN:    Bring out your dead!
  138.               [clang]
  139.               Bring out your dead!
  140.               [clang]
  141.               Bring out your dead!
  142. CUSTOMER:     Here's one -- nine pence.
  143. DEAD PERSON:  I'm not dead!
  144.                                   The Quest for the Holy Grail (Monty Python)
  145.  
  146.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  147. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  148. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  149.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  150.