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 ... [unexpectedly]
> >
> > I agree, Hari. I'd expect funcref function('s:T') to be callable
> > outside of the script, too.
>
> To make myself more clear. I expect g:Xxx() to be callable
> from global scope of from another script in this example:
>
> " --- scritp x.vim
> function! s:XXX()
> echo "func XXX"
> endfunction
>
> let g:Xxx=function('s:XXX')
>
> Yakov
>
The problem with this is that you can no longer have private object
function refs.
Of course you can .:
let s:Xxx=function('s:XXX') " script-private funcref
let l:Xxx=function('s:XXX') " function-private funcref
let g:Xxx=function('s:XXX') " globally-accessible funcref
Yakov