]> git.pld-linux.org Git - packages/vim.git/blob - 5.7.017
official patches for vim.
[packages/vim.git] / 5.7.017
1 To: vim-dev@vim.org
2 Subject: Patch 5.7.017
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 ------------
6
7 Patch 5.7.017
8 Problem:    When using a Vim script for Vim 6.0 with <SID> before a function
9             name, it produces an error message even when inside an "if version
10             >= 600".  (Charles Campbell)
11 Solution:   Ignore errors in the function name when the function is not going
12             to be defined.
13 Files:      src/eval.c
14
15
16 *** ../vim-5.7.16/src/eval.c    Tue Jun  6 12:55:14 2000
17 --- src/eval.c  Thu Nov 16 15:18:27 2000
18 ***************
19 *** 4822,4828 ****
20         return;
21       }
22   
23 !     if (!isupper(*eap->arg))
24       {
25         EMSG2("Function name must start with a capital: %s", eap->arg);
26         return;
27 --- 4822,4828 ----
28         return;
29       }
30   
31 !     if (!isupper(*eap->arg) && !eap->skip)
32       {
33         EMSG2("Function name must start with a capital: %s", eap->arg);
34         return;
35 ***************
36 *** 4858,4864 ****
37       name = eap->arg;
38       for (p = name; isalpha(*p) || isdigit(*p) || *p == '_'; ++p)
39         ;
40 !     if (p == name)
41       {
42         EMSG("Function name required");
43         return;
44 --- 4858,4864 ----
45       name = eap->arg;
46       for (p = name; isalpha(*p) || isdigit(*p) || *p == '_'; ++p)
47         ;
48 !     if (p == name && !eap->skip)
49       {
50         EMSG("Function name required");
51         return;
52 ***************
53 *** 4867,4874 ****
54       p = skipwhite(p);
55       if (*p != '(')
56       {
57 !       EMSG2("Missing '(': %s", name);
58 !       return;
59       }
60       p = skipwhite(p + 1);
61   
62 --- 4867,4878 ----
63       p = skipwhite(p);
64       if (*p != '(')
65       {
66 !       if (!eap->skip)
67 !       {
68 !           EMSG2("Missing '(': %s", name);
69 !           return;
70 !       }
71 !       p = vim_strchr(p, '(');
72       }
73       p = skipwhite(p + 1);
74   
75 ***************
76 *** 4893,4899 ****
77                 ++p;
78             if (arg == p || isdigit(*arg))
79             {
80 !               EMSG2("Illegal argument: %s", arg);
81                 goto erret;
82             }
83             if (ga_grow(&newargs, 1) == FAIL)
84 --- 4897,4904 ----
85                 ++p;
86             if (arg == p || isdigit(*arg))
87             {
88 !               if (!eap->skip)
89 !                   EMSG2("Illegal argument: %s", arg);
90                 goto erret;
91             }
92             if (ga_grow(&newargs, 1) == FAIL)
93 ***************
94 *** 4915,4921 ****
95         p = skipwhite(p);
96         if (mustend && *p != ')')
97         {
98 !           EMSG2(e_invarg2, eap->arg);
99             goto erret;
100         }
101       }
102 --- 4920,4927 ----
103         p = skipwhite(p);
104         if (mustend && *p != ')')
105         {
106 !           if (!eap->skip)
107 !               EMSG2(e_invarg2, eap->arg);
108             goto erret;
109         }
110       }
111 ***************
112 *** 4941,4947 ****
113   
114       if (*p != NUL && *p != '"' && *p != '\n')
115       {
116 !       EMSG(e_trailing);
117         goto erret;
118       }
119   
120 --- 4947,4954 ----
121   
122       if (*p != NUL && *p != '"' && *p != '\n')
123       {
124 !       if (!eap->skip)
125 !           EMSG(e_trailing);
126         goto erret;
127       }
128   
129 *** ../vim-5.7.16/src/version.c Thu Nov 16 15:15:50 2000
130 --- src/version.c       Thu Nov 16 15:15:17 2000
131 ***************
132 *** 439,440 ****
133 --- 439,442 ----
134   {   /* Add new patch number below this line */
135 + /**/
136 +     17,
137   /**/
138
139 -- 
140 hundred-and-one symptoms of being an internet addict:
141 145. You e-mail your boss, informing him you'll be late.
142
143 ///  Bram Moolenaar     Bram@moolenaar.net     http://www.moolenaar.net  \\\
144 \\\  Vim: http://www.vim.org      ICCF Holland: http://iccf-holland.org  ///
This page took 0.04435 seconds and 3 git commands to generate.