Karsten Hopp c1f325
To: vim-dev@vim.org
Karsten Hopp c1f325
Subject: Patch 7.2.061
Karsten Hopp c1f325
Fcc: outbox
Karsten Hopp c1f325
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp c1f325
Mime-Version: 1.0
Karsten Hopp c1f325
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp c1f325
Content-Transfer-Encoding: 8bit
Karsten Hopp c1f325
------------
Karsten Hopp c1f325
Karsten Hopp c1f325
Patch 7.2.061
Karsten Hopp c1f325
Problem:    Can't create a funcref for an autoload function without loading
Karsten Hopp c1f325
	    the script first. (Marc Weber)
Karsten Hopp c1f325
Solution:   Accept autoload functions that don't exist yet in function().
Karsten Hopp c1f325
Files:	    src/eval.c
Karsten Hopp c1f325
Karsten Hopp c1f325
Karsten Hopp c1f325
*** ../vim-7.2.060/src/eval.c	Fri Nov 28 21:26:50 2008
Karsten Hopp c1f325
--- src/eval.c	Sat Nov 29 12:28:51 2008
Karsten Hopp c1f325
***************
Karsten Hopp c1f325
*** 10339,10345 ****
Karsten Hopp c1f325
      s = get_tv_string(&argvars[0]);
Karsten Hopp c1f325
      if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
Karsten Hopp c1f325
  	EMSG2(_(e_invarg2), s);
Karsten Hopp c1f325
!     else if (!function_exists(s))
Karsten Hopp c1f325
  	EMSG2(_("E700: Unknown function: %s"), s);
Karsten Hopp c1f325
      else
Karsten Hopp c1f325
      {
Karsten Hopp c1f325
--- 10339,10346 ----
Karsten Hopp c1f325
      s = get_tv_string(&argvars[0]);
Karsten Hopp c1f325
      if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
Karsten Hopp c1f325
  	EMSG2(_(e_invarg2), s);
Karsten Hopp c1f325
!     /* Don't check an autoload name for existence here. */
Karsten Hopp c1f325
!     else if (vim_strchr(s, AUTOLOAD_CHAR) == NULL && !function_exists(s))
Karsten Hopp c1f325
  	EMSG2(_("E700: Unknown function: %s"), s);
Karsten Hopp c1f325
      else
Karsten Hopp c1f325
      {
Karsten Hopp c1f325
*** ../vim-7.2.060/src/version.c	Sun Nov 30 21:11:54 2008
Karsten Hopp c1f325
--- src/version.c	Wed Dec  3 09:49:07 2008
Karsten Hopp c1f325
***************
Karsten Hopp c1f325
*** 678,679 ****
Karsten Hopp c1f325
--- 678,681 ----
Karsten Hopp c1f325
  {   /* Add new patch number below this line */
Karsten Hopp c1f325
+ /**/
Karsten Hopp c1f325
+     61,
Karsten Hopp c1f325
  /**/
Karsten Hopp c1f325
Karsten Hopp c1f325
-- 
Karsten Hopp c1f325
There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
Karsten Hopp c1f325
Linux, etc, and those who know COBOL.  It gets very difficult for me at
Karsten Hopp c1f325
parties, not knowing which group to socialise with :-)
Karsten Hopp c1f325
						Sitaram Chamarty
Karsten Hopp c1f325
Karsten Hopp c1f325
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp c1f325
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp c1f325
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp c1f325
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///