Thanks Charles... the g: did the trick!
On Mon, May 11, 2009 at 1:35 PM, Charles Campbell <
[email protected]> wrote:
>
> Hari wrote:
> > I'm trying to customize the standard library function with my own.
> > However, I want the scripts to proceed irrespective of the actual
> > function.
> >
> > So, I do this to create my own default handler for 'Taglist':
> >
> > if exists("*Taglist") == 0
> > let Taglist = function("taglist")
> > endif
>
> I'm not sure what your problem is; however, here's several issues
>
> * just to be sure: if the code snippet above is inside a function, then
> Taglist is local, not global. Avoid any such problem by using g:Taglist
> * except for dictionaries, functions must start with a capital letter or
> "s:".
> >
> > And in the scripts, I call:
> >
> > let blah = Taglist(".*")
> >
> >
> > if I try an exists("*Taglist") on the command line, it shows a "1".
> > However, inside the script, the name "Taglist" is not recognized. Is
> > this possible or have I got something wrong somewhere?
> If you're using the exists("*Taglist") inside a function, then that
> Taglist function reference is (trying to) use a local variable. Try using
> exists("*g:Taglist") (ie. using a global variable) instead.
>
> Regards,
> Chip Campbell
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---