]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.412
- remove missing .po files
[packages/vim.git] / 6.2.412
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.412
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.2.412
11 Problem:    Ruby: "ruby << EOF" inside a function doesn't always work.  Also
12             for ":python", ":tcl" and ":perl".
13 Solution:   Check for "<< marker" and skip until "marker" before checking for
14             "endfunction".
15 Files:      src/eval.c
16
17
18 *** ../vim-6.2.411/src/eval.c   Mon Mar 29 14:32:19 2004
19 --- src/eval.c  Mon Mar 29 15:25:42 2004
20 ***************
21 *** 8696,8702 ****
22       ufunc_T   *fp;
23       int               indent;
24       int               nesting;
25 !     int               in_append = FALSE;
26       static char_u e_funcexts[] = N_("E122: Function %s already exists, add ! to replace it");
27   
28       /*
29 --- 8698,8704 ----
30       ufunc_T   *fp;
31       int               indent;
32       int               nesting;
33 !     char_u    *skip_until = NULL;
34       static char_u e_funcexts[] = N_("E122: Function %s already exists, add ! to replace it");
35   
36       /*
37 ***************
38 *** 8899,8909 ****
39             goto erret;
40         }
41   
42 !       if (in_append)
43         {
44 !           /* between ":append" and "." there is no check for ":endfunc". */
45 !           if (theline[0] == '.' && theline[1] == NUL)
46 !               in_append = FALSE;
47         }
48         else
49         {
50 --- 8901,8915 ----
51             goto erret;
52         }
53   
54 !       if (skip_until != NULL)
55         {
56 !           /* between ":append" and "." and between ":python <<EOF" and "EOF"
57 !            * don't check for ":endfunc". */
58 !           if (STRCMP(theline, skip_until) == 0)
59 !           {
60 !               vim_free(skip_until);
61 !               skip_until = NULL;
62 !           }
63         }
64         else
65         {
66 ***************
67 *** 8948,8954 ****
68                     || (p[0] == 'i'
69                         && (!ASCII_ISALPHA(p[1]) || (p[1] == 'n'
70                                 && (!ASCII_ISALPHA(p[2]) || (p[2] == 's'))))))
71 !               in_append = TRUE;
72         }
73   
74         /* Add the line to the function. */
75 --- 8954,8981 ----
76                     || (p[0] == 'i'
77                         && (!ASCII_ISALPHA(p[1]) || (p[1] == 'n'
78                                 && (!ASCII_ISALPHA(p[2]) || (p[2] == 's'))))))
79 !               skip_until = vim_strsave((char_u *)".");
80
81 !           /* Check for ":python <<EOF", ":tcl <<EOF", etc. */
82 !           arg = skipwhite(skiptowhite(p));
83 !           if (arg[0] == '<' && arg[1] =='<'
84 !                   && ((p[0] == 'p' && p[1] == 'y'
85 !                                   && (!ASCII_ISALPHA(p[2]) || p[2] == 't'))
86 !                       || (p[0] == 'p' && p[1] == 'e'
87 !                                   && (!ASCII_ISALPHA(p[2]) || p[2] == 'r'))
88 !                       || (p[0] == 't' && p[1] == 'c'
89 !                                   && (!ASCII_ISALPHA(p[2]) || p[2] == 'l'))
90 !                       || (p[0] == 'r' && p[1] == 'u' && p[2] == 'b'
91 !                                   && (!ASCII_ISALPHA(p[3]) || p[3] == 'y'))
92 !                       ))
93 !           {
94 !               /* ":python <<" continues until a dot, like ":append" */
95 !               p = skipwhite(arg + 2);
96 !               if (*p == NUL)
97 !                   skip_until = vim_strsave((char_u *)".");
98 !               else
99 !                   skip_until = vim_strsave(p);
100 !           }
101         }
102   
103         /* Add the line to the function. */
104 ***************
105 *** 9004,9012 ****
106 --- 9031,9041 ----
107   #ifdef FEAT_MAGIC_BRACES
108       did_emsg |= saved_did_emsg;
109   #endif
110 +     vim_free(skip_until);
111       return;
112   
113   erret:
114 +     vim_free(skip_until);
115       ga_clear_strings(&newargs);
116       ga_clear_strings(&newlines);
117   erret_name:
118 *** ../vim-6.2.411/src/version.c        Mon Mar 29 14:32:19 2004
119 --- src/version.c       Mon Mar 29 16:11:00 2004
120 ***************
121 *** 639,640 ****
122 --- 639,642 ----
123   {   /* Add new patch number below this line */
124 + /**/
125 +     412,
126   /**/
127
128 -- 
129 If Microsoft would build a car...
130 ... the oil, water temperature, and alternator warning lights would
131 all be replaced by a single "General Protection Fault" warning light.
132
133  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
134 ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
135 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
136  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
This page took 0.031243 seconds and 3 git commands to generate.