[SCM] Vim packaging branch, maint/lenny, updated. debian/7.1.314-3-51-g209709e

James Vega jamessan at debian.org
Sun Oct 12 06:29:13 UTC 2008


The following commit has been merged in the maint/lenny branch:
commit 6e7d9ce9b76f673280ff791565a3e19514893e4a
Author: James Vega <jamessan at debian.org>
Date:   Thu Oct 9 22:11:33 2008 -0400

    Update filename escaping for filetype.vim
    
    Signed-off-by: James Vega <jamessan at debian.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 0022c85..b771ad6 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -25,7 +25,7 @@ au BufNewFile,BufRead *~
 	\ if s:name != s:short && s:short != "" |
 	\   exe "doau filetypedetect BufRead " . fnameescape(s:short) |
 	\ endif |
-	\ unlet s:name s:short
+	\ unlet! s:name s:short
 au BufNewFile,BufRead ?\+.in
 	\ if expand("<afile>:t") != "configure.in" |
 	\   exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
@@ -181,7 +181,7 @@ func! s:FTasm()
     endif
   endif
 
-  exe "setf " . b:asmsyntax
+  exe "setf " . fnameescape(b:asmsyntax)
 endfunc
 
 func! s:FTasmsyntax()
@@ -189,8 +189,9 @@ func! s:FTasmsyntax()
   " b:asmsyntax appropriately
   let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4).
 	\" ".getline(5)." "
-  if head =~ '\sasmsyntax=\S\+\s'
-    let b:asmsyntax = substitute(head, '.*\sasmsyntax=\([a-zA-Z0-9]\+\)\s.*','\1', "")
+  let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
+  if match != ''
+    let b:asmsyntax = match
   elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
     let b:asmsyntax = "vmasm"
   endif
@@ -1288,7 +1289,7 @@ func! s:FTinc()
     else
       call s:FTasmsyntax()
       if exists("b:asmsyntax")
-	exe "setf " . b:asmsyntax
+	exe "setf " . fnameescape(b:asmsyntax)
       else
 	setf pov
       endif

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list