Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.2.061
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.061
Problem:    Can't create a funcref for an autoload function without loading
	    the script first. (Marc Weber)
Solution:   Accept autoload functions that don't exist yet in function().
Files:	    src/eval.c


*** ../vim-7.2.060/src/eval.c	Fri Nov 28 21:26:50 2008
--- src/eval.c	Sat Nov 29 12:28:51 2008
***************
*** 10339,10345 ****
      s = get_tv_string(&argvars[0]);
      if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
  	EMSG2(_(e_invarg2), s);
!     else if (!function_exists(s))
  	EMSG2(_("E700: Unknown function: %s"), s);
      else
      {
--- 10339,10346 ----
      s = get_tv_string(&argvars[0]);
      if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
  	EMSG2(_(e_invarg2), s);
!     /* Don't check an autoload name for existence here. */
!     else if (vim_strchr(s, AUTOLOAD_CHAR) == NULL && !function_exists(s))
  	EMSG2(_("E700: Unknown function: %s"), s);
      else
      {
*** ../vim-7.2.060/src/version.c	Sun Nov 30 21:11:54 2008
--- src/version.c	Wed Dec  3 09:49:07 2008
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     61,
  /**/

-- 
There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
Linux, etc, and those who know COBOL.  It gets very difficult for me at
parties, not knowing which group to socialise with :-)
						Sitaram Chamarty

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///