r158 - in trunk/vim/debian: . patches

Stefano Zacchiroli zack@costa.debian.org
Mon, 11 Apr 2005 22:14:54 +0000


Author: zack
Date: 2005-04-11 22:14:52 +0000 (Mon, 11 Apr 2005)
New Revision: 158

Modified:
   trunk/vim/debian/changelog
   trunk/vim/debian/patches/118_ocaml.vim.diff
Log:
upgraded ocaml runtime files (new upstream)


Modified: trunk/vim/debian/changelog
===================================================================
--- trunk/vim/debian/changelog	2005-04-11 21:13:10 UTC (rev 157)
+++ trunk/vim/debian/changelog	2005-04-11 22:14:52 UTC (rev 158)
@@ -6,6 +6,8 @@
     + Re-add dh_installdirs to vim-variant part in debian/rules, so copying
       the desktop file no longer fails. (closes: #302830)
     + Enabled backupcopy in global vimrc. (closes: #158657)
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Updated patch 118_ocaml.vim.diff (new upstream)
 
  -- Norbert Tretkowski <nobse@debian.org>  Mon, 11 Apr 2005 12:08:49 +0200
 

Modified: trunk/vim/debian/patches/118_ocaml.vim.diff
===================================================================
--- trunk/vim/debian/patches/118_ocaml.vim.diff	2005-04-11 21:13:10 UTC (rev 157)
+++ trunk/vim/debian/patches/118_ocaml.vim.diff	2005-04-11 22:14:52 UTC (rev 158)
@@ -1,7 +1,7 @@
 diff -urN vim63/runtime/ftplugin/ocaml.vim vim63.new/runtime/ftplugin/ocaml.vim
 --- vim63/runtime/ftplugin/ocaml.vim	2003-05-11 21:09:36.000000000 +0200
-+++ vim63.new/runtime/ftplugin/ocaml.vim	2005-03-24 22:40:02.000000000 +0100
-@@ -1,36 +1,52 @@
++++ vim63.new/runtime/ftplugin/ocaml.vim	2005-04-12 00:09:16.000000000 +0200
+@@ -1,36 +1,59 @@
 -" Vim settings file
 -" Language:     OCaml
 -" Maintainers:  Mike Leary    <leary@nwlink.com>
@@ -17,10 +17,17 @@
 +"              Markus Mottl        <markus.mottl@gmail.com>
 +"              Stefano Zacchiroli  <zack@bononia.it>
 +" URL:         http://www.ocaml.info/vim/ftplugin/ocaml.vim
-+" Last Change: 2005 March 24
++" Last Change: 2005 March 25
 +" Changelog:
-+"              - Made displaying type information use LocalLeader
-+"                rather than ','
++"         0.12 - Modeline support
++"              - Folding now works also when indent_struct != 2
++"              - Changed folding customization variable, default is off
++"              - Made folding settings local to the buffer
++"              - Included the official ftplugin ocaml.vim, except
++"                annotations stuff, and parenthesis around assert false
++"                abbreviation
++"              - Corrected toplevel let folding
++"              - Made the file reloading correctly
 +"
 +" omlet.vim plugins -- utilities for working on OCaml files with VIm
 +" Copyright (C) 2005 D. Baelde, M. Leary, M. Mottl, S. Zacchiroli
@@ -42,14 +49,17 @@
 +" Do these settings once per buffer
  
 -" Only do these settings when not done yet for this buffer
- if exists("b:did_ftplugin")
-   finish
- endif
+-if exists("b:did_ftplugin")
+-  finish
+-endif
+-
+-" Don't do other file type settings for this buffer
+-let b:did_ftplugin = 1
++" if exists("b:did_ftplugin")
++"   finish
++" endif
 +let b:did_ftplugin=1
  
--" Don't do other file type settings for this buffer
--let b:did_ftplugin = 1
--
 +" Error handling -- helps moving where the compiler wants you to go
  set cpo-=C
 -
@@ -77,7 +87,7 @@
    if !hasmapto('<Plug>Comment')
      nmap <buffer> <LocalLeader>c <Plug>LUncomOn
      vmap <buffer> <LocalLeader>c <Plug>BUncomOn
-@@ -47,3 +63,320 @@
+@@ -47,3 +70,338 @@
      iabbrev <buffer> ASS (assert false)
    endif
  endif
@@ -114,23 +124,47 @@
 +
 +" Folding support
 +
++" Get the modeline because folding depends on indentation
++let s:s = line2byte(line('.'))+col('.')-1
++if search('^\s*(\*:o\?caml:')
++  let s:modeline = getline(".")
++else
++  let s:modeline = ""
++endif
++if s:s > 0
++  exe 'goto' s:s
++endif
++
++" Get the indentation params
++let s:m = matchstr(s:modeline,'default\s*=\s*\d\+')
++if s:m != ""
++  let s:idef = matchstr(s:m,'\d\+')
++elseif exists("g:omlet_indent")
++  let s:idef = g:omlet_indent
++else
++  let s:idef = 2
++endif
++let s:m = matchstr(s:modeline,'struct\s*=\s*\d\+')
++if s:m != ""
++  let s:i = matchstr(s:m,'\d\+')
++elseif exists("g:omlet_indent_struct")
++  let s:i = g:omlet_indent_struct
++else
++  let s:i = s:idef
++endif
++
++" Set the folding method
 +if exists("g:ocaml_folding")
 +  setlocal foldmethod=expr
 +  setlocal foldexpr=OMLetFoldLevel(v:lnum)
 +endif
 +
++" - Only definitions below, executed once -------------------------------------
++
 +if exists("*OMLetFoldLevel")
 +  finish
 +endif
 +
-+if exists("g:omlet_indent_struct")
-+  let s:i = g:omlet_indent_struct
-+elseif exists("g:omlet_indent")
-+  let s:i = g:omlet_indent
-+else
-+  let s:i = 2
-+endif
-+
 +function s:topindent(lnum)
 +  let l = a:lnum
 +  while l > 0
@@ -217,12 +251,6 @@
 +  finish
 +endif
 +
-+if !exists("g:did_ocaml_dtypes")
-+  let g:did_ocaml_dtypes = 1
-+else
-+  finish
-+endif
-+
 +python << EOF
 +
 +import re
@@ -384,7 +412,7 @@
 +
 +EOF
 +
-+fun OCamlPrintType(current_mode)
++fun! OCamlPrintType(current_mode)
 +  if (a:current_mode == "visual")
 +    python printOCamlType("visual")
 +  else
@@ -392,7 +420,7 @@
 +  endif
 +endfun
 +
-+fun OCamlParseAnnot()
++fun! OCamlParseAnnot()
 +  python parseOCamlAnnot()
 +endfun
 +
@@ -400,7 +428,7 @@
 +vmap <LocalLeader>t :call OCamlPrintType("visual")<RETURN>
 diff -urN vim63/runtime/indent/ocaml.vim vim63.new/runtime/indent/ocaml.vim
 --- vim63/runtime/indent/ocaml.vim	2003-04-14 21:03:07.000000000 +0200
-+++ vim63.new/runtime/indent/ocaml.vim	2005-03-07 21:26:47.000000000 +0100
++++ vim63.new/runtime/indent/ocaml.vim	2005-04-12 00:09:37.000000000 +0200
 @@ -1,12 +1,12 @@
  " Vim indent file
 -" Language:	OCaml
@@ -416,9 +444,9 @@
 +"               Mike Leary          <leary@nwlink.com>
 +"               Markus Mottl        <markus.mottl@gmail.com>
 +" URL:          http://www.ocaml.info/vim/indent/ocaml.vim
-+" Last Change:  2005 Mar 06 - Fixed multiline comments, thanks Andrzej Ostruszka
++" Last Change:  2005 Apr 11 - Fixed an indentation bug concerning "let" (MM)
++"               2005 Mar 06 - Fixed multiline comments, thanks Andrzej Ostruszka
 +"               2005 Mar 02 - Simplified a few rules (JY)
-+"               2005 Feb 28 - Fixed E488 errors, thanks Andrzej Ostruszka
  
  " Only load this indent file when no other was loaded.
  if exists("b:did_indent")
@@ -467,7 +495,7 @@
    if line =~ '^\s*end\>'
      return s:FindPair(s:module, '','\<end\>')
  
-@@ -118,150 +116,110 @@
+@@ -118,150 +116,108 @@
    elseif line =~ '^\s*)'
      return s:FindPair('(', '',')')
  
@@ -478,8 +506,6 @@
      if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet
        return s:FindLet(s:type, '','\<let\s*$')
 -    else return ind
-+    else
-+      return ind
      endif
  
 -  " Indent if current line begins with 'type'
@@ -666,7 +692,7 @@
      let ind = ind + &sw
  
    " Back to normal indent after lines ending with ';;':
-@@ -297,10 +255,14 @@
+@@ -297,10 +253,14 @@
    elseif lline =~ ')\s*$'
      let ind = s:FindPair('(', '',')')
  
@@ -684,8 +710,8 @@
  
 diff -urN vim63/runtime/syntax/ocaml.vim vim63.new/runtime/syntax/ocaml.vim
 --- vim63/runtime/syntax/ocaml.vim	2003-05-04 23:12:48.000000000 +0200
-+++ vim63.new/runtime/syntax/ocaml.vim	2005-03-15 22:54:14.000000000 +0100
-@@ -1,13 +1,17 @@
++++ vim63.new/runtime/syntax/ocaml.vim	2005-04-12 00:10:02.000000000 +0200
+@@ -1,19 +1,23 @@
  " Vim syntax file
  " Language:     OCaml
  " Filenames:    *.ml *.mli *.mll *.mly
@@ -710,6 +736,13 @@
  
  " For version 5.x: Clear all syntax items
  " For version 6.x: Quit when a syntax file was already loaded
+ if version < 600
+   syntax clear
+-elseif exists("b:current_syntax")
++elseif exists("b:current_syntax") && b:current_syntax != "ocaml"
+   finish
+ endif
+ 
 @@ -24,7 +28,7 @@
  syn match    ocamlComment   "^#!.*"