Loading ...
Sorry, an error occurred while loading the content.
 

Patch 6.1.264

Expand Messages
  • Bram Moolenaar
    Patch 6.1.264 (depends on patch 6.1.254) Problem: exists() does not work for built-in functions. (Steve Wall) Solution: Don t check for the function name
    Message 1 of 1 , Dec 22, 2002
      Patch 6.1.264 (depends on patch 6.1.254)
      Problem: exists() does not work for built-in functions. (Steve Wall)
      Solution: Don't check for the function name to start with a capital.
      Files: src/eval.c


      *** ../vim61.263/src/eval.c Tue Nov 19 11:17:56 2002
      --- src/eval.c Sun Dec 22 11:15:06 2002
      ***************
      *** 339,345 ****
      static void set_var __ARGS((char_u *name, VAR varp));
      static void copy_var __ARGS((VAR from, VAR to));
      static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags));
      ! static char_u *trans_function_name __ARGS((char_u **pp, int skip));
      static int eval_fname_script __ARGS((char_u *p));
      static int eval_fname_sid __ARGS((char_u *p));
      static void list_func_head __ARGS((ufunc_T *fp));
      --- 339,345 ----
      static void set_var __ARGS((char_u *name, VAR varp));
      static void copy_var __ARGS((VAR from, VAR to));
      static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags));
      ! static char_u *trans_function_name __ARGS((char_u **pp, int skip, int internal));
      static int eval_fname_script __ARGS((char_u *p));
      static int eval_fname_sid __ARGS((char_u *p));
      static void list_func_head __ARGS((ufunc_T *fp));
      ***************
      *** 3469,3475 ****
      else if (*p == '*') /* internal or user defined function */
      {
      ++p;
      ! p = trans_function_name(&p, FALSE);
      if (p != NULL)
      {
      if (ASCII_ISUPPER(*p) || p[0] == K_SPECIAL)
      --- 3472,3478 ----
      else if (*p == '*') /* internal or user defined function */
      {
      ++p;
      ! p = trans_function_name(&p, FALSE, TRUE);
      if (p != NULL)
      {
      if (ASCII_ISUPPER(*p) || p[0] == K_SPECIAL)
      ***************
      *** 7719,7725 ****
      }

      p = eap->arg;
      ! name = trans_function_name(&p, eap->skip);
      if (name == NULL && !eap->skip)
      return;

      --- 7722,7728 ----
      }

      p = eap->arg;
      ! name = trans_function_name(&p, eap->skip, FALSE);
      if (name == NULL && !eap->skip)
      return;

      ***************
      *** 8004,8012 ****
      * Advances "pp" to just after the function name (if no error).
      */
      static char_u *
      ! trans_function_name(pp, skip)
      char_u **pp;
      int skip; /* only find the end, don't evaluate */
      {
      char_u *name;
      char_u *start;
      --- 8007,8016 ----
      * Advances "pp" to just after the function name (if no error).
      */
      static char_u *
      ! trans_function_name(pp, skip, internal)
      char_u **pp;
      int skip; /* only find the end, don't evaluate */
      + int internal; /* TRUE if internal function name OK */
      {
      char_u *name;
      char_u *start;
      ***************
      *** 8069,8075 ****
      }
      else
      {
      ! if (!ASCII_ISUPPER(*start))
      {
      EMSG2(_("E128: Function name must start with a capital: %s"),
      start);
      --- 8073,8079 ----
      }
      else
      {
      ! if (!internal && !ASCII_ISUPPER(*start))
      {
      EMSG2(_("E128: Function name must start with a capital: %s"),
      start);
      ***************
      *** 8241,8247 ****
      char_u *name;

      p = eap->arg;
      ! name = trans_function_name(&p, eap->skip);
      if (name == NULL)
      return;
      if (!ends_excmd(*skipwhite(p)))
      --- 8245,8251 ----
      char_u *name;

      p = eap->arg;
      ! name = trans_function_name(&p, eap->skip, FALSE);
      if (name == NULL)
      return;
      if (!ends_excmd(*skipwhite(p)))
      *** ../vim61.263/src/version.c Tue Nov 19 13:53:29 2002
      --- src/version.c Sun Dec 22 11:20:11 2002
      ***************
      *** 608,609 ****
      --- 608,611 ----
      { /* Add new patch number below this line */
      + /**/
      + 264,
      /**/

      --
      hundred-and-one symptoms of being an internet addict:
      108. While reading a magazine, you look for the Zoom icon for a better
      look at a photograph.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.