]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.402
- new
[packages/vim.git] / 7.2.402
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.402
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.2.402
11 Problem:    This gives a #705 error: let X = function('haslocaldir')
12             let X = function('getcwd')
13 Solution:   Don't give E705 when the name is found in the hashtab. (Sergey
14             Khorev)
15 Files:      src/eval.c
16
17
18 *** ../vim-7.2.401/src/eval.c   2010-03-10 13:43:22.000000000 +0100
19 --- src/eval.c  2010-03-17 19:35:01.000000000 +0100
20 ***************
21 *** 19103,19108 ****
22 --- 19103,19116 ----
23       hashtab_T *ht;
24       char_u    *p;
25   
26 +     ht = find_var_ht(name, &varname);
27 +     if (ht == NULL || *varname == NUL)
28 +     {
29 +       EMSG2(_(e_illvar), name);
30 +       return;
31 +     }
32 +     v = find_var_in_ht(ht, varname, TRUE);
33
34       if (tv->v_type == VAR_FUNC)
35       {
36         if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':')
37 ***************
38 *** 19112,19118 ****
39             EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
40             return;
41         }
42 !       if (function_exists(name))
43         {
44             EMSG2(_("E705: Variable name conflicts with existing function: %s"),
45                                                                         name);
46 --- 19120,19129 ----
47             EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
48             return;
49         }
50 !       /* Don't allow hiding a function.  When "v" is not NULL we migth be
51 !        * assigning another function to the same var, the type is checked
52 !        * below. */
53 !       if (v == NULL && function_exists(name))
54         {
55             EMSG2(_("E705: Variable name conflicts with existing function: %s"),
56                                                                         name);
57 ***************
58 *** 19120,19133 ****
59         }
60       }
61   
62 -     ht = find_var_ht(name, &varname);
63 -     if (ht == NULL || *varname == NUL)
64 -     {
65 -       EMSG2(_(e_illvar), name);
66 -       return;
67 -     }
68
69 -     v = find_var_in_ht(ht, varname, TRUE);
70       if (v != NULL)
71       {
72         /* existing variable, need to clear the value */
73 --- 19131,19136 ----
74 *** ../vim-7.2.401/src/version.c        2010-03-17 19:13:19.000000000 +0100
75 --- src/version.c       2010-03-17 19:36:09.000000000 +0100
76 ***************
77 *** 683,684 ****
78 --- 683,686 ----
79   {   /* Add new patch number below this line */
80 + /**/
81 +     402,
82   /**/
83
84 -- 
85 Michael: There is no such thing as a dump question.
86 Bernard: Sure there is.  For example "what is a core dump?"
87
88  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
89 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
90 \\\        download, build and distribute -- http://www.A-A-P.org        ///
91  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.03663 seconds and 3 git commands to generate.