Ken Takata wrote:

> 2016/7/23 Sat 21:01:44 UTC+9 Bram Moolenaar wrote:
> > Ken Takata wrote:
> > 
> > > 2014/8/7 Thu 14:22:32 UTC+9 mattn wrote:
> > > > Hi list.
> > > > 
> > > > ----------------------------------------
> > > > let s:f = function('type')
> > > > let s:fref = function('s:f')
> > > > " => <SNR>1_f
> > > > echo call(s:fref, ['x'])
> > > > " => E117: Unknown function: <SNR>1_f
> > > > ----------------------------------------
> > > > 
> > > > In this script, function('s:f') should be an error.
> > > > 
> > > > ----------------------------------------
> > > > let s:fref = function('s:f')
> > > > ----------------------------------------
> > > 
> > > How about this patch?
> > > https://bitbucket.org/k_takata/vim-ktakata-mq/src/535170f9175dbfd922535d585a4b63736329b209/function-noderef.patch?at=default
> > > 
> > > This doesn't break existing tests.
> > > I'm not sure which file should I add new tests for this to.
> > 
> > I think test_expr.vim is a good place.  But perhaps this test also needs
> > to include another script to check passing a script-local function in a
> > funcref to another script?
> 
> I added very simple test.
> 
> * function(s:f) works, but
> * function('s:f') causes an error.
> 
> Please check the following patch:
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/95e9a10fea18993f6dcc710364c2908acb1e2caa/function-noderef.patch?at=default

Thanks.  Do we need to mention this in the help somewhere?

-- 
LETTERS TO THE EDITOR (The Times of London)

Dear Sir,

I am firmly opposed to the spread of microchips either to the home or
to the office.  We have more than enough of them foisted upon us in
public places.  They are a disgusting Americanism, and can only result
in the farmers being forced to grow smaller potatoes, which in turn
will cause massive unemployment in the already severely depressed
agricultural industry.

Yours faithfully,
        Capt. Quinton D'Arcy, J. P.
        Sevenoaks

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui