Hi,
The documentation of Funcref includes the following statement:
A Funcref variable must start with a capital, "s:", "w:",
"t:" or "b:".
It seems that sentence is incomplete. I think the intention was to
write:
A Funcref variable must start with a capital letter and both
the function being referred to and the Funcref variable must
have the same scope, being prefixed by "s:", "w:", "t:" or
"b:".
But there is other problem in the documentation: although not
mentioned, "g:" also works even if it isn't explicitly prefixed in
the script, as in the example below where script_b.vim sources
script_a.vim. If we do :so % while editing script_b.vim,
FunctionA is executed:
" script_a.vim:
function FunctionA()
echo "Hello World!"
endfunction
" script_b.vim
source script_a.vim
let CallFunctionA = function("FunctionA")
call CallFunctionA()
Note: I'm using global Funcref to global functions in the
Vim-R-plugin. So I hope that the problem is in the documentation
and not in the actual Vim behavior.
Thanks!
--
Jakson Alves de Aquino
Federal University of CearĂ¡
Social Sciences Department
www.lepem.ufc.br/aquino.php
--
--
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/groups/opt_out.