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.2 / 7.2.402 < prev    next >
Encoding:
Internet Message Format  |  2010-03-16  |  2.6 KB

  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.       if (tv->v_type == VAR_FUNC)
  34.       {
  35.       if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':')
  36. ***************
  37. *** 19112,19118 ****
  38.           EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
  39.           return;
  40.       }
  41. !     if (function_exists(name))
  42.       {
  43.           EMSG2(_("E705: Variable name conflicts with existing function: %s"),
  44.                                       name);
  45. --- 19120,19129 ----
  46.           EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
  47.           return;
  48.       }
  49. !     /* Don't allow hiding a function.  When "v" is not NULL we migth be
  50. !      * assigning another function to the same var, the type is checked
  51. !      * below. */
  52. !     if (v == NULL && function_exists(name))
  53.       {
  54.           EMSG2(_("E705: Variable name conflicts with existing function: %s"),
  55.                                       name);
  56. ***************
  57. *** 19120,19133 ****
  58.       }
  59.       }
  60.   
  61. -     ht = find_var_ht(name, &varname);
  62. -     if (ht == NULL || *varname == NUL)
  63. -     {
  64. -     EMSG2(_(e_illvar), name);
  65. -     return;
  66. -     }
  67. -     v = find_var_in_ht(ht, varname, TRUE);
  68.       if (v != NULL)
  69.       {
  70.       /* existing variable, need to clear the value */
  71. --- 19131,19136 ----
  72. *** ../vim-7.2.401/src/version.c    2010-03-17 19:13:19.000000000 +0100
  73. --- src/version.c    2010-03-17 19:36:09.000000000 +0100
  74. ***************
  75. *** 683,684 ****
  76. --- 683,686 ----
  77.   {   /* Add new patch number below this line */
  78. + /**/
  79. +     402,
  80.   /**/
  81.  
  82. -- 
  83. Michael: There is no such thing as a dump question.
  84. Bernard: Sure there is.  For example "what is a core dump?"
  85.  
  86.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  87. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  88. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  89.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  90.