Thinca wrote:
> Hi list.
>
> Please see the following code.
> ----------
> let dict = {}
>
> function dict['/foo']()
> endfunction
> " => E475: Invalid argument: /foo
>
> function dict['foo']()
> endfunction
> " OK.
>
> let dict['/foo'] = function('tr')
> function! dict['/foo']()
> endfunction
> " Overwrite is OK
>
> call dict['/foo']() " OK.
> ----------
>
> I also expect ":function dict['/foo']()" to be ok.
> I write a patch and test for this.
>
> https://gist.github.com/thinca/5797391
>
> However, I am not confident for this patch.
> Please check it.
I do not like the idea of accessing functions with arbitrary names.
I would rather also disallow:
let dict['/foo'] = function('tr')
Would that break any plugin?
--
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
- Einstein
/// 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/groups/opt_out.