Package: vim-latexsuite
Version: 0.20041219-1
Severity: normal

Documentation says:
********************************************************************************
Tex_UseMakefile                                            *ls_10_6_7* *ls_a_du*
                                                               *Tex_UseMakefile*

Type             boolean
Default Value    1                  

When set to 1, then if a makefile or Makefile is present in the current
directory, then Latex-Suite sets the makeprg option to just "make <target>",
where <target> is the target format chosen using the TCTarget or TTarget
commands.
********************************************************************************

So I persume, that in default configuration, when I have a Makefile in pwd
makeprg should be set to "make dvi". Its not.

Following patch makes me happy, but I don't it's the firs time I touched
any vim script, so I'm not sure of its quality. It mostly rearranges existing
lines of code.

--- compiler.vim.old    2005-05-25 01:47:11.095674928 +0200
+++ compiler.vim        2005-05-25 01:47:20.684200776 +0200
@@ -23,21 +23,19 @@

        let targetRule = Tex_GetVarValue('Tex_'.a:type.'Rule_'.target)

-       if targetRule != ''
-               if a:type == 'Compile'
-                       let &l:makeprg = escape(targetRule, 
Tex_GetVarValue('Tex_EscapeChars'))
-               elseif a:type == 'View'
-                       let s:viewer = targetRule
-               endif
-               let s:target = target
-
-       elseif Tex_GetVarValue('Tex_'.a:type.'RuleComplete_'.target) != ''
-               let s:target = target
-
-       else
-               let curd = getcwd()
-               exe 'cd '.expand('%:p:h')
-               if !Tex_GetVarValue('Tex_UseMakefile') || (glob('makefile*') == 
'' && glob('Makefile*') == '')
+       let curd = getcwd()
+       exe 'cd '.expand('%:p:h')
+       if !Tex_GetVarValue('Tex_UseMakefile') || (glob('makefile*') == '' && 
glob('Makefile*') == '')
+               if targetRule != ''
+                       if a:type == 'Compile'
+                               let &l:makeprg = escape(targetRule, 
Tex_GetVarValue('Tex_EscapeChars'))
+                       elseif a:type == 'View'
+                               let s:viewer = targetRule
+                       endif
+                       let s:target = target
+               elseif Tex_GetVarValue('Tex_'.a:type.'RuleComplete_'.target) != 
''
+                       let s:target = target
+               else
                        if has('gui_running')
                                call confirm(
                                        \'No '.a:type.' rule defined for target 
'.target."\n".
@@ -53,12 +51,13 @@
                                        \'for more information'
                                        \)
                        endif
-               else
-                       echomsg 'Assuming target is for makefile'
-                       let s:target = target
                endif
-               exe 'cd '.curd
+       else
+               echomsg 'Assuming target is for makefile'
+               let s:target = target
+               let &l:makeprg = 'make '.target
        endif
+       exe 'cd '.curd
 endfunction

 function! SetTeXTarget(...)


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (800, 'testing'), (70, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11dwapiii.1.0
Locale: LANG=C, LC_CTYPE=polish (charmap=ISO-8859-2)

Versions of packages vim-latexsuite depends on:
ii  vim                          1:6.3-071+1 Vi IMproved - enhanced vi editor

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to