Karsten Hopp cf9f5a
" netrwFileHandlers: contains various extension-based file handlers for
Karsten Hopp cf9f5a
"                    netrw's browsers' x command ("eXecute launcher")
Karsten Hopp cf9f5a
" Author:	Charles E. Campbell, Jr.
Karsten Hopp cf9f5a
" Date:		Sep 30, 2008
Karsten Hopp cf9f5a
" Version:	10
Karsten Hopp cf9f5a
" Copyright:    Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
Karsten Hopp cf9f5a
"               Permission is hereby granted to use and distribute this code,
Karsten Hopp cf9f5a
"               with or without modifications, provided that this copyright
Karsten Hopp cf9f5a
"               notice is copied with it. Like anything else that's free,
Karsten Hopp cf9f5a
"               netrwFileHandlers.vim is provided *as is* and comes with no
Karsten Hopp cf9f5a
"               warranty of any kind, either expressed or implied. In no
Karsten Hopp cf9f5a
"               event will the copyright holder be liable for any damages
Karsten Hopp cf9f5a
"               resulting from the use of this software.
Karsten Hopp cf9f5a
"
Karsten Hopp cf9f5a
" Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1
Karsten Hopp cf9f5a
"                is eternal life in Christ Jesus our Lord.
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" Load Once: {{{1
Karsten Hopp cf9f5a
if exists("g:loaded_netrwFileHandlers") || &cp
Karsten Hopp cf9f5a
 finish
Karsten Hopp cf9f5a
endif
Karsten Hopp cf9f5a
let g:loaded_netrwFileHandlers= "v10"
Karsten Hopp cf9f5a
if v:version < 702
Karsten Hopp cf9f5a
 echohl WarningMsg
Karsten Hopp cf9f5a
 echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
Karsten Hopp cf9f5a
 echohl Normal
Karsten Hopp cf9f5a
 finish
Karsten Hopp cf9f5a
endif
Karsten Hopp cf9f5a
let s:keepcpo= &cpo
Karsten Hopp cf9f5a
set cpo&vim
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" netrwFileHandlers#Invoke: {{{1
Karsten Hopp cf9f5a
fun! netrwFileHandlers#Invoke(exten,fname)
Karsten Hopp cf9f5a
"  call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
Karsten Hopp cf9f5a
  let fname= a:fname
Karsten Hopp cf9f5a
  " list of supported special characters.  Consider rcs,v --- that can be
Karsten Hopp cf9f5a
  " supported with a NFH_rcsCOMMAv() handler
Karsten Hopp cf9f5a
  if a:fname =~ '[@:,$!=\-+%?;~]'
Karsten Hopp cf9f5a
   let specials= {
Karsten Hopp cf9f5a
\   '@' : 'AT',
Karsten Hopp cf9f5a
\   ':' : 'COLON',
Karsten Hopp cf9f5a
\   ',' : 'COMMA',
Karsten Hopp cf9f5a
\   '$' : 'DOLLAR',
Karsten Hopp cf9f5a
\   '!' : 'EXCLAMATION',
Karsten Hopp cf9f5a
\   '=' : 'EQUAL',
Karsten Hopp cf9f5a
\   '-' : 'MINUS',
Karsten Hopp cf9f5a
\   '+' : 'PLUS',
Karsten Hopp cf9f5a
\   '%' : 'PERCENT',
Karsten Hopp cf9f5a
\   '?' : 'QUESTION',
Karsten Hopp cf9f5a
\   ';' : 'SEMICOLON',
Karsten Hopp cf9f5a
\   '~' : 'TILDE'}
Karsten Hopp cf9f5a
   let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
Karsten Hopp cf9f5a
"   call Decho('fname<'.fname.'> done with dictionary')
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if a:exten != "" && exists("*NFH_".a:exten)
Karsten Hopp cf9f5a
   " support user NFH_*() functions
Karsten Hopp cf9f5a
"   call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
Karsten Hopp cf9f5a
   exe "let ret= NFH_".a:exten.'("'.fname.'")'
Karsten Hopp cf9f5a
  elseif a:exten != "" && exists("*s:NFH_".a:exten)
Karsten Hopp cf9f5a
   " use builtin-NFH_*() functions
Karsten Hopp cf9f5a
"   call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
Karsten Hopp cf9f5a
   exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
  
Karsten Hopp cf9f5a
"  call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
Karsten Hopp cf9f5a
  return 0
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_html: handles html when the user hits "x" when the {{{1
Karsten Hopp cf9f5a
"                        cursor is atop a *.html file
Karsten Hopp cf9f5a
fun! s:NFH_html(pagefile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_html(".a:pagefile.")")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  let page= substitute(a:pagefile,'^','file://','')
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("mozilla")
Karsten Hopp cf9f5a
"   call Decho("executing !mozilla ".page)
Karsten Hopp cf9f5a
   exe "!mozilla ".shellescape(page,1)
Karsten Hopp cf9f5a
  elseif executable("netscape")
Karsten Hopp cf9f5a
"   call Decho("executing !netscape ".page)
Karsten Hopp cf9f5a
   exe "!netscape ".shellescape(page,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_html 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_html 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_htm: handles html when the user hits "x" when the {{{1
Karsten Hopp cf9f5a
"                        cursor is atop a *.htm file
Karsten Hopp cf9f5a
fun! s:NFH_htm(pagefile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_htm(".a:pagefile.")")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  let page= substitute(a:pagefile,'^','file://','')
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("mozilla")
Karsten Hopp cf9f5a
"   call Decho("executing !mozilla ".page)
Karsten Hopp cf9f5a
   exe "!mozilla ".shellescape(page,1)
Karsten Hopp cf9f5a
  elseif executable("netscape")
Karsten Hopp cf9f5a
"   call Decho("executing !netscape ".page)
Karsten Hopp cf9f5a
   exe "!netscape ".shellescape(page,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_htm 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_htm 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_jpg: {{{1
Karsten Hopp cf9f5a
fun! s:NFH_jpg(jpgfile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("gimp")
Karsten Hopp cf9f5a
   exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
Karsten Hopp cf9f5a
  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
Karsten Hopp cf9f5a
"   call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
Karsten Hopp cf9f5a
   exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_jpg 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_jpg 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_gif: {{{1
Karsten Hopp cf9f5a
fun! s:NFH_gif(giffile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("gimp")
Karsten Hopp cf9f5a
   exe "silent! !gimp -s ".shellescape(a:giffile,1)
Karsten Hopp cf9f5a
  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
Karsten Hopp cf9f5a
   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_gif 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_gif 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_png: {{{1
Karsten Hopp cf9f5a
fun! s:NFH_png(pngfile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("gimp")
Karsten Hopp cf9f5a
   exe "silent! !gimp -s ".shellescape(a:pngfile,1)
Karsten Hopp cf9f5a
  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
Karsten Hopp cf9f5a
   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_png 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_png 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_pnm: {{{1
Karsten Hopp cf9f5a
fun! s:NFH_pnm(pnmfile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("gimp")
Karsten Hopp cf9f5a
   exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
Karsten Hopp cf9f5a
  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
Karsten Hopp cf9f5a
   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_pnm 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_pnm 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_bmp: visualize bmp files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_bmp(bmpfile)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("gimp")
Karsten Hopp cf9f5a
   exe "silent! !gimp -s ".a:bmpfile
Karsten Hopp cf9f5a
  elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
Karsten Hopp cf9f5a
   exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_bmp 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_bmp 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_pdf: visualize pdf files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_pdf(pdf)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
Karsten Hopp cf9f5a
  if executable("gs")
Karsten Hopp cf9f5a
   exe 'silent! !gs '.shellescape(a:pdf,1)
Karsten Hopp cf9f5a
  elseif executable("pdftotext")
Karsten Hopp cf9f5a
   exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"  call Dret("s:NFH_pdf 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_pdf 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_doc: visualize doc files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_doc(doc)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_doc(doc<".a:doc.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("oowriter")
Karsten Hopp cf9f5a
   exe 'silent! !oowriter '.shellescape(a:doc,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"  call Dret("s:NFH_doc 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_doc 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_sxw: visualize sxw files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_sxw(sxw)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("oowriter")
Karsten Hopp cf9f5a
   exe 'silent! !oowriter '.shellescape(a:sxw,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_sxw 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_sxw 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_xls: visualize xls files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_xls(xls)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_xls(xls<".a:xls.">)")
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
  if executable("oocalc")
Karsten Hopp cf9f5a
   exe 'silent! !oocalc '.shellescape(a:xls,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"  call Dret("s:NFH_xls 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_xls 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_ps: handles PostScript files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_ps(ps)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_ps(ps<".a:ps.">)")
Karsten Hopp cf9f5a
  if executable("gs")
Karsten Hopp cf9f5a
"   call Decho("exe silent! !gs ".a:ps)
Karsten Hopp cf9f5a
   exe "silent! !gs ".shellescape(a:ps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  elseif executable("ghostscript")
Karsten Hopp cf9f5a
"   call Decho("exe silent! !ghostscript ".a:ps)
Karsten Hopp cf9f5a
   exe "silent! !ghostscript ".shellescape(a:ps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  elseif executable("gswin32")
Karsten Hopp cf9f5a
"   call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
Karsten Hopp cf9f5a
   exe "silent! !gswin32 ".shellescape(a:ps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_ps 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_ps 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_eps: handles encapsulated PostScript files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_eps(eps)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_eps()")
Karsten Hopp cf9f5a
  if executable("gs")
Karsten Hopp cf9f5a
   exe "silent! !gs ".shellescape(a:eps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  elseif executable("ghostscript")
Karsten Hopp cf9f5a
   exe "silent! !ghostscript ".shellescape(a:eps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  elseif executable("ghostscript")
Karsten Hopp cf9f5a
   exe "silent! !ghostscript ".shellescape(a:eps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  elseif executable("gswin32")
Karsten Hopp cf9f5a
   exe "silent! !gswin32 ".shellescape(a:eps,1)
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_eps 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
"  call Dret("s:NFH_eps 0")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_fig: handles xfig files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_fig(fig)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_fig()")
Karsten Hopp cf9f5a
  if executable("xfig")
Karsten Hopp cf9f5a
   exe "silent! !xfig ".a:fig
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_fig 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_fig 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
" s:NFH_obj: handles tgif's obj files {{{1
Karsten Hopp cf9f5a
fun! s:NFH_obj(obj)
Karsten Hopp cf9f5a
"  call Dfunc("s:NFH_obj()")
Karsten Hopp cf9f5a
  if has("unix") && executable("tgif")
Karsten Hopp cf9f5a
   exe "silent! !tgif ".a:obj
Karsten Hopp cf9f5a
   redraw!
Karsten Hopp cf9f5a
  else
Karsten Hopp cf9f5a
"   call Dret("s:NFH_obj 0")
Karsten Hopp cf9f5a
   return 0
Karsten Hopp cf9f5a
  endif
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
"  call Dret("s:NFH_obj 1")
Karsten Hopp cf9f5a
  return 1
Karsten Hopp cf9f5a
endfun
Karsten Hopp cf9f5a
Karsten Hopp cf9f5a
let &cpo= s:keepcpo
Karsten Hopp cf9f5a
" ---------------------------------------------------------------------
Karsten Hopp cf9f5a
"  Modelines: {{{1
Karsten Hopp cf9f5a
"  vim: fdm=marker