At the first, I'm not thinking that your suggestion is bad. I'm thinking you 
should expain more to convince bram.
For example, you can do it with separated functions.

" get candidates. this function is called by omnifunc and utility function
function! s:get_candidate(findstart, base, from_complete_function)
  if a:from_complete_function
    " make result for foo#bar()
  else
    " make result for prefetch candidates.
  endif
endfunction

" this function is called only from omnifunc.
function! foo#bar(findstart, base)
  " ... do something ...

  return s:get_candidate(a:findstart, a:base, 1)
endfunction

" function for prefetch candidates.
function! foo#get_candidate()
  let l:findstart = ...
  let l:base = ...
  return s:get_candidate(l:findstart, l:base, 0)
endfunction

" get prefetched candidates.
let s:prefetch = foo#get_candidate()

set omnifunc=foo#bar


-- 
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

Raspunde prin e-mail lui