Re: Funcref and script local functions

2006-07-08 Thread Bram Moolenaar
Hari Krishna Dara wrote: When Funcref's were introduced in Vim7, I expected them to work for script-local functions, across scripts. The documentation didn't say that, but it didn't say that it wouldn't either, and I thought that that is one of its biggest uses (other than the actual

Re: Funcref and script local functions

2006-07-08 Thread Hari Krishna Dara
On Sat, 8 Jul 2006 at 3:10pm, Bram Moolenaar wrote: Hari Krishna Dara wrote: When Funcref's were introduced in Vim7, I expected them to work for script-local functions, across scripts. The documentation didn't say that, but it didn't say that it wouldn't either, and I thought that that

Re: Funcref and script local functions

2006-07-03 Thread Eric Arnold
On 7/2/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: On Thu, 29 Jun 2006 at 10:50pm, Eric Arnold wrote: Ok. For starters, it seems that you *can* call a numbered function from anywhere: function! s:T() echomsg here echomsg 'SID=' . expand( 'sfile' ) endfunction let

Re: Funcref and script local functions

2006-07-03 Thread Yakov Lerner
On 7/3/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 6/30/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: ... The Funcref obtained via function('s:T') can't be called from outside the script ... [unexpectedly] I agree, Hari. I'd expect funcref function('s:T') to be callable outside of the

Re: Funcref and script local functions

2006-07-03 Thread Eric Arnold
On 7/3/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 7/3/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 6/30/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: ... The Funcref obtained via function('s:T') can't be called from outside the script ... [unexpectedly] I agree, Hari. I'd expect

Re: Funcref and script local functions

2006-07-03 Thread Yakov Lerner
On 7/3/06, Eric Arnold [EMAIL PROTECTED] wrote: On 7/3/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 7/3/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 6/30/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: ... The Funcref obtained via function('s:T') can't be called from outside the script

Re: Funcref and script local functions

2006-07-02 Thread Hari Krishna Dara
On Thu, 29 Jun 2006 at 10:50pm, Eric Arnold wrote: Ok. For starters, it seems that you *can* call a numbered function from anywhere: function! s:T() echomsg here echomsg 'SID=' . expand( 'sfile' ) endfunction let F=function('s:T') echomsg F() let F1 = function( 'SNR66_T' )

Funcref and script local functions

2006-06-29 Thread Hari Krishna Dara
When Funcref's were introduced in Vim7, I expected them to work for script-local functions, across scripts. The documentation didn't say that, but it didn't say that it wouldn't either, and I thought that that is one of its biggest uses (other than the actual intended functionality, which is for