Am 11.08.2019 um 00:11 schrieb Bram Moolenaar:
Currently user functions can be used both without a context and as a
method, it is not possible to restrict them to be used as one or the
other.  Very often this doesn't matter, the method is the same as the
function, passing the base as the first argument.  But questions arise:

- What if the function doesn't take an argument, should it not be able
   to be used as a method?  Or always result in an error?  Or should we
   be able to define a function FooBar() without an argument to be used
   as a function and a function FooBar() with an argument to be used as a
   method:
        func Report()
          echo "nothing to report"
        endfunc
        func Report(msg)
          echo "this happened: " .. a:msg
        endfunc

I have a mechanism in place which loads global functions via
FuncUndefined (similar to DrChip's AsNeeded).

Now I wonder how to find the right script when the function name alone
is no longer enough for the lookup.

--
Andy

--
--
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/5D50370D.5080107%40yahoo.de.

Raspunde prin e-mail lui