[SCM] Vim packaging branch, debian, updated. upstream/7.2.010-252-g640acfb

James Vega jamessan at debian.org
Thu Oct 2 15:56:43 UTC 2008


The following commit has been merged in the debian branch:
commit 640acfb6d12c660a297699b6c89464ecce2795af
Author: James Vega <jamessan at debian.org>
Date:   Wed Oct 1 09:24:15 2008 -0400

    Set the papersize without using the shell.
    
    This prevents needing to work around a non-POSIX $SHELL.
    
    Thanks to Matt Wozniski for the idea.
    
    Signed-off-by: James Vega <jamessan at debian.org>

diff --git a/debian/runtime/debian.vim.in b/debian/runtime/debian.vim.in
index 9e52929..065bae6 100644
--- a/debian/runtime/debian.vim.in
+++ b/debian/runtime/debian.vim.in
@@ -1,4 +1,3 @@
-
 " Debian system-wide default configuration Vim
 
 set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/@VIMCUR@,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
@@ -38,16 +37,10 @@ endif
 
 " Set paper size from /etc/papersize if available (Debian-specific)
 if filereadable("/etc/papersize")
-  try
-    let s:shellbak = &shell
-    let &shell="/bin/sh"
-    let s:papersize = matchstr(system("cat /etc/papersize"), "\\p*")
-    let &shell=s:shellbak
-    if strlen(s:papersize)
-      let &printoptions = "paper:" . s:papersize
-    endif
-  catch /^Vim\%((\a\+)\)\=:E145/
-  endtry
+  let s:papersize = matchstr(readfile('/etc/papersize', '', 1), '\p*')
+  if strlen(s:papersize)
+    exe "set printoptions+=paper:" . s:papersize
+  endif
 endif
 
 if has('gui_running')

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list