r116 - in trunk/vim/debian: . patches

Stefano Zacchiroli zack@costa.debian.org
Sat, 26 Mar 2005 12:55:46 +0000


Author: zack
Date: 2005-03-26 12:55:45 +0000 (Sat, 26 Mar 2005)
New Revision: 116

Added:
   trunk/vim/debian/compat
   trunk/vim/debian/patches/118_ocaml.vim.diff
   trunk/vim/debian/patches/302_message.c.diff
Modified:
   trunk/vim/debian/changelog
   trunk/vim/debian/rules
Log:
- patches: added 118_ocaml and 302_message
- debian/rules: uses debian/compat, fix in make_patch, added cmdline VARIANT override
see changelog for more info


Modified: trunk/vim/debian/changelog
===================================================================
--- trunk/vim/debian/changelog	2005-03-26 12:53:43 UTC (rev 115)
+++ trunk/vim/debian/changelog	2005-03-26 12:55:45 UTC (rev 116)
@@ -38,6 +38,16 @@
     + Fixed wrong highlighting of comments in syntax/sh.vim when comments
       occur between switches of case. (closes: #269325)
 
+  * Stefano Zacchiroli <zack@debian.org>:
+    + Added patch 302_message.c.diff (CTRL-C quit loops in range commands)
+      (closes: #295639)
+    + Added patch 118_ocaml.vim.diff (ship latest version of ocaml runtime
+      support files: {syntax,ftplugin,ident}/ocaml.vim)
+    + debian/rules
+      - uses debian/compat in place of debian/rules' DH_COMPAT
+      - added support for command line VARIANT variable to override VARIANTS
+      - ignores diff error in "make_patch" target since diff usually returns 1
+
  -- Norbert Tretkowski <nobse@debian.org>  Sat, 26 Mar 2005 11:14:08 +0100
 
 vim (1:6.3-067+2) unstable; urgency=medium

Added: trunk/vim/debian/compat
===================================================================
--- trunk/vim/debian/compat	2005-03-26 12:53:43 UTC (rev 115)
+++ trunk/vim/debian/compat	2005-03-26 12:55:45 UTC (rev 116)
@@ -0,0 +1 @@
+4

Added: trunk/vim/debian/patches/118_ocaml.vim.diff
===================================================================
--- trunk/vim/debian/patches/118_ocaml.vim.diff	2005-03-26 12:53:43 UTC (rev 115)
+++ trunk/vim/debian/patches/118_ocaml.vim.diff	2005-03-26 12:55:45 UTC (rev 116)
@@ -0,0 +1,871 @@
+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 @@
+-" Vim settings file
+-" Language:     OCaml
+-" Maintainers:  Mike Leary    <leary@nwlink.com>
+-"		Markus Mottl  <markus@oefai.at>
+-" URL:		http://www.ai.univie.ac.at/~markus/vim/ftplugin/ocaml.vim
+-" Last Change:	2003 May 11
+-"		2001 Nov 01 - added local bindings for inserting
+-"			      type holes using 'assert false' (MM)
+-"		2001 Oct 02 - insert spaces in line comments (MM)
++" Language:    OCaml
++" Maintainer:  David Baelde        <firstname.name@ens-lyon.org>
++"              Mike Leary          <leary@nwlink.com>
++"              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
++" Changelog:
++"              - Made displaying type information use LocalLeader
++"                rather than ','
++"
++" omlet.vim plugins -- utilities for working on OCaml files with VIm
++" Copyright (C) 2005 D. Baelde, M. Leary, M. Mottl, S. Zacchiroli
++"
++" This program is free software; you can redistribute it and/or modify
++" it under the terms of the GNU General Public License as published by
++" the Free Software Foundation; either version 2 of the License, or
++" (at your option) any later version.
++"
++" This program is distributed in the hope that it will be useful,
++" but WITHOUT ANY WARRANTY; without even the implied warranty of
++" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++" GNU General Public License for more details.
++"
++" You should have received a copy of the GNU General Public License
++" along with this program; if not, write to the Free Software
++" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++" Folding is activated if ocaml_folding is set
++" Do these settings once per buffer
+ 
+-" Only do these settings when not done yet for this buffer
+ 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
+-
+-" Error formats
+ setlocal efm=
+-  \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
+-  \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
+-  \%+EReference\ to\ unbound\ regexp\ name\ %m,
+-  \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
+-  \%Wocamlyacc:\ w\ -\ %m,
+-  \%-Zmake%.%#,
+-  \%C%m
++      \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
++      \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
++      \%+EReference\ to\ unbound\ regexp\ name\ %m,
++      \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
++      \%Wocamlyacc:\ w\ -\ %m,
++      \%-Zmake%.%#,
++      \%C%m
+ 
+ " Add mappings, unless the user didn't want this.
+ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
+-  " Uncommenting
++  " (un)commenting
+   if !hasmapto('<Plug>Comment')
+     nmap <buffer> <LocalLeader>c <Plug>LUncomOn
+     vmap <buffer> <LocalLeader>c <Plug>BUncomOn
+@@ -47,3 +63,320 @@
+     iabbrev <buffer> ASS (assert false)
+   endif
+ endif
++
++" Let % jump between structure elements (due to Issac Trotts)
++let b:mw='\<let\>:\<and\>:\(\<in\>\|;;\),'
++let b:mw=b:mw . '\<if\>:\<then\>:\<else\>,\<do\>:\<done\>,'
++let b:mw=b:mw . '\<\(object\|sig\|struct\|begin\)\>:\<end\>'
++let b:match_words=b:mw
++
++" switching between interfaces (.mli) and implementations (.ml)
++if !exists("g:did_ocaml_switch")
++  let g:did_ocaml_switch = 1
++  map <LocalLeader>s :call OCaml_switch(0)<CR>
++  map <LocalLeader>S :call OCaml_switch(1)<CR>
++  fun OCaml_switch(newwin)
++    if (match(bufname(""), "\\.mli$") >= 0)
++      let fname = substitute(bufname(""), "\\.mli$", ".ml", "")
++      if (a:newwin == 1)
++        exec "new " . fname
++      else
++        exec "arge " . fname
++      endif
++    elseif (match(bufname(""), "\\.ml$") >= 0)
++      let fname = bufname("") . "i"
++      if (a:newwin == 1)
++        exec "new " . fname
++      else
++        exec "arge " . fname
++      endif
++    endif
++  endfun
++endif
++
++" Folding support
++
++if exists("g:ocaml_folding")
++  setlocal foldmethod=expr
++  setlocal foldexpr=OMLetFoldLevel(v:lnum)
++endif
++
++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
++    if getline(l) =~ '\s*\%(\<struct\>\|\<sig\>\|\<object\>\)'
++      return indent(l)
++    endif
++    let l = l-1
++  endwhile
++  return -s:i
++endfunction
++
++function OMLetFoldLevel(l)
++
++  " This is for not merging blank lines around folds to them
++  if getline(a:l) !~ '\S'
++    return -1
++  endif
++
++  " We start folds for modules, classes, and every toplevel definition
++  if getline(a:l) =~ '^\s*\%(\<val\>\|\<module\>\|\<class\>\|\<type\>\|\<method\>\|\<initializer\>\|\<inherit\>\|\<exception\>\|\<external\>\)'
++    exe 'return ">' (indent(a:l)/s:i)+1 '"'
++  endif
++
++  " Toplevel let are detected thanks to the indentation
++  if getline(a:l) =~ '^\s*let\>' && indent(a:l) == s:i+s:topindent(a:l)
++    exe 'return ">' (indent(a:l)/s:i)+1 '"'
++  endif
++
++  " We close fold on end which are associated to struct, sig or object.
++  " We use syntax information to do that.
++  if getline(a:l) =~ '^\s*end\>' && synIDattr(synID(a:l, indent(a:l)+1, 0), "name") != "ocamlKeyword"
++    return (indent(a:l)/s:i)+1
++  endif
++
++  " Folds end on ;;
++  if getline(a:l) =~ '^\s*;;'
++    exe 'return "<' (indent(a:l)/s:i)+1 '"'
++  endif
++
++  " Comments around folds aren't merged to them.
++  if synIDattr(synID(a:l, indent(a:l)+1, 0), "name") == "ocamlComment"
++    return -1
++  endif
++
++  return '='
++endfunction
++
++" Vim support for OCaml .annot files (requires Vim with python support)
++"
++" Executing OCamlPrintType(<mode>) function will display in the Vim bottom
++" line(s) the type of an ocaml value getting it from the corresponding .annot
++" file (if any).  If Vim is in visual mode, <mode> should be "visual" and the
++" selected ocaml value correspond to the highlighted text, otherwise (<mode>
++" can be anything else) it corresponds to the literal found at the current
++" cursor position.
++"
++" .annot files are parsed lazily the first time OCamlPrintType is invoked; is
++" also possible to force the parsing using the OCamlParseAnnot() function.
++"
++" Typing ',3' will cause OCamlPrintType function to be invoked with
++" the right argument depending on the current mode (visual or not).
++"
++" Copyright (C) <2003-2004> Stefano Zacchiroli <zack@bononia.it>
++"
++" Created:        Wed, 01 Oct 2003 18:16:22 +0200 zack
++" LastModified:   Wed, 25 Aug 2004 18:28:39 +0200 zack
++"
++"
++" This program is free software; you can redistribute it and/or modify
++" it under the terms of the GNU General Public License as published by
++" the Free Software Foundation; either version 2 of the License, or
++" (at your option) any later version.
++"
++" This program is distributed in the hope that it will be useful,
++" but WITHOUT ANY WARRANTY; without even the implied warranty of
++" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++" GNU General Public License for more details.
++"
++" You should have received a copy of the GNU General Public License
++" along with this program; if not, write to the Free Software
++" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++
++if !has("python")
++  finish
++endif
++
++if !exists("g:did_ocaml_dtypes")
++  let g:did_ocaml_dtypes = 1
++else
++  finish
++endif
++
++python << EOF
++
++import re
++import os
++import string
++import time
++import vim
++
++debug = False
++
++class AnnExc(Exception):
++    def __init__(self, reason):
++        self.reason = reason
++
++no_annotations = AnnExc("No type annotations (.annot) file found")
++annotation_not_found = AnnExc("No type annotation found for the given text")
++def malformed_annotations(lineno):
++    return AnnExc("Malformed .annot file (line = %d)" % lineno)
++
++class Annotations:
++    """
++      .annot ocaml file representation
++
++      File format (copied verbatim from caml-types.el)
++
++      file ::= block *
++      block ::= position <SP> position <LF> annotation *
++      position ::= filename <SP> num <SP> num <SP> num
++      annotation ::= keyword open-paren <LF> <SP> <SP> data <LF> close-paren
++
++      <SP> is a space character (ASCII 0x20)
++      <LF> is a line-feed character (ASCII 0x0A)
++      num is a sequence of decimal digits
++      filename is a string with the lexical conventions of O'Caml
++      open-paren is an open parenthesis (ASCII 0x28)
++      close-paren is a closed parenthesis (ASCII 0x29)
++      data is any sequence of characters where <LF> is always followed by
++           at least two space characters.
++
++      - in each block, the two positions are respectively the start and the
++        end of the range described by the block.
++      - in a position, the filename is the name of the file, the first num
++        is the line number, the second num is the offset of the beginning
++        of the line, the third num is the offset of the position itself.
++      - the char number within the line is the difference between the third
++        and second nums.
++
++      For the moment, the only possible keyword is \"type\"."
++    """
++
++    def __init__(self):
++        self.__filename = None  # last .annot parsed file
++        self.__ml_filename = None # as above but s/.annot/.ml/
++        self.__timestamp = None # last parse action timestamp
++        self.__annot = {}
++        self.__re = re.compile(
++          '^"[^"]*"\s+(\d+)\s+(\d+)\s+(\d+)\s+"[^"]*"\s+(\d+)\s+(\d+)\s+(\d+)$')
++
++    def __parse(self, fname):
++        try:
++            f = open(fname)
++            line = f.readline() # position line
++            lineno = 1
++            while (line != ""):
++                m = self.__re.search(line)
++                if (not m):
++                    raise malformed_annotations(lineno)
++                line1 = int(m.group(1))
++                col1 = int(m.group(3)) - int(m.group(2))
++                line2 = int(m.group(4))
++                col2 = int(m.group(6)) - int(m.group(5))
++                line = f.readline() # "type(" string
++                lineno += 1
++                if (line == ""): raise malformed_annotations(lineno)
++                type = []
++                line = f.readline() # type description
++                lineno += 1
++                if (line == ""): raise malformed_annotations(lineno)
++                while line != ")\n":
++                    type.append(string.strip(line))
++                    line = f.readline()
++                    lineno += 1
++                    if (line == ""): raise malformed_annotations(lineno)
++                type = string.join(type, "\n")
++                key = ((line1, col1), (line2, col2))
++                if not self.__annot.has_key(key):
++                    self.__annot[key] = type
++                line = f.readline() # position line
++            f.close()
++            self.__filename = fname
++            self.__ml_filename = re.sub("\.annot$", ".ml", fname)
++            self.__timestamp = int(time.time())
++        except IOError:
++            raise no_annotations
++
++    def parse(self):
++        annot_file = re.sub("\.ml$", ".annot", vim.current.buffer.name)
++        self.__parse(annot_file)
++
++    def get_type(self, (line1, col1), (line2, col2)):
++        if debug:
++            print line1, col1, line2, col2
++        if vim.current.buffer.name == None:
++            raise no_annotations
++        if vim.current.buffer.name != self.__ml_filename or  \
++          os.stat(self.__filename).st_mtime > self.__timestamp:
++            self.parse()
++        try:
++            return self.__annot[(line1, col1), (line2, col2)]
++        except KeyError:
++            raise annotation_not_found
++
++word_char_RE = re.compile("^[\w.]$")
++
++  # TODO this function should recognize ocaml literals, actually it's just an
++  # hack that recognize continuous sequences of word_char_RE above
++def findBoundaries(line, col):
++    """ given a cursor position (as returned by vim.current.window.cursor)
++    return two integers identify the beggining and end column of the word at
++    cursor position, if any. If no word is at the cursor position return the
++    column cursor position twice """
++    left, right = col, col
++    line = line - 1 # mismatch vim/python line indexes
++    (begin_col, end_col) = (0, len(vim.current.buffer[line]) - 1)
++    try:
++        while word_char_RE.search(vim.current.buffer[line][left - 1]):
++            left = left - 1
++    except IndexError:
++        pass
++    try:
++        while word_char_RE.search(vim.current.buffer[line][right + 1]):
++            right = right + 1
++    except IndexError:
++        pass
++    return (left, right)
++
++annot = Annotations() # global annotation object
++
++def printOCamlType(mode):
++    try:
++        if mode == "visual":  # visual mode: lookup highlighted text
++            (line1, col1) = vim.current.buffer.mark("<")
++            (line2, col2) = vim.current.buffer.mark(">")
++        else: # any other mode: lookup word at cursor position
++            (line, col) = vim.current.window.cursor
++            (col1, col2) = findBoundaries(line, col)
++            (line1, line2) = (line, line)
++        begin_mark = (line1, col1)
++        end_mark = (line2, col2 + 1)
++        print annot.get_type(begin_mark, end_mark)
++    except AnnExc, exc:
++        print exc.reason
++
++def parseOCamlAnnot():
++    try:
++        annot.parse()
++    except AnnExc, exc:
++        print exc.reason
++
++EOF
++
++fun OCamlPrintType(current_mode)
++  if (a:current_mode == "visual")
++    python printOCamlType("visual")
++  else
++    python printOCamlType("normal")
++  endif
++endfun
++
++fun OCamlParseAnnot()
++  python parseOCamlAnnot()
++endfun
++
++map <LocalLeader>t :call OCamlPrintType("normal")<RETURN>
++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
+@@ -1,12 +1,12 @@
+ " Vim indent file
+-" Language:	OCaml
+-" Maintainers:	Jean-Francois Yuen  <jfyuen@ifrance.com>
+-"		Mike Leary	    <leary@nwlink.com>
+-"		Markus Mottl	    <markus@oefai.at>
+-" URL:		http://www.oefai.at/~markus/vim/indent/ocaml.vim
+-" Last Change:	2003 Apr 14
+-"		2003 Mar 05 - Added '{<' and some fixes (JY)
+-"		2002 Nov 06 - Some fixes (JY)
++" Language:     OCaml
++" Maintainers:  Jean-Fran├žois Yuen  <jfyuen@happycoders.org>
++"               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
++"               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")
+@@ -16,7 +16,7 @@
+ 
+ setlocal expandtab
+ setlocal indentexpr=GetOCamlIndent()
+-setlocal indentkeys+=0=and,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0=;;,0=>\],0=\|\],0=\|,0=*),0=>},0},0\],0)
++setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0)
+ setlocal nolisp
+ setlocal nosmartindent
+ setlocal textwidth=80
+@@ -33,14 +33,13 @@
+ endif
+ 
+ " Define some patterns:
+-let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\|(\)\s*$'
++let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|<-\|=\|;\|(\)\s*$'
+ let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>'
+ let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$'
+ let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>'
+ let s:module = '\<\%(begin\|sig\|struct\|object\)\>'
+ let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$'
+-let s:type = '^\s*\%(let\|type\)\>.*='
+-let s:val = '^\s*\(val\|external\)\>.*:'
++let s:type = '^\s*\%(class\|let\|type\)\>.*='
+ 
+ " Skipping pattern, for comments
+ function s:SkipPattern(lnum, pat)
+@@ -75,7 +74,7 @@
+ " Indent 'let'
+ function s:FindLet(pstart, pmid, pend)
+   call search(a:pend, 'bW')
+-  return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ "^\\s*let\\>.*=\\s*$\\|" . s:beflet'))
++  return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ s:beflet'))
+ endfunction
+ 
+ function GetOCamlIndent()
+@@ -97,8 +96,7 @@
+ 
+   let line = getline(v:lnum)
+ 
+-  " Indent if current line begins with 'end'
+-  " for 'sig', 'struct', 'object' and 'begin':
++  " Indent if current line begins with 'end':
+   if line =~ '^\s*end\>'
+     return s:FindPair(s:module, '','\<end\>')
+ 
+@@ -118,150 +116,110 @@
+   elseif line =~ '^\s*)'
+     return s:FindPair('(', '',')')
+ 
+-  " Indent if current line begins with 'let'
+-  " and last line does not begin with 'let' or end with 'in' or ';;':
++  " Indent if current line begins with 'let':
+   elseif line =~ '^\s*let\>'
+     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'
+-  " and last line does not end with 'and' or ';;':
+-  elseif line =~ '^\s*type\>'
++  " Indent if current line begins with 'class' or 'type':
++  elseif line =~ '^\s*\(class\|type\)\>'
+     if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim
+-      return s:FindLet(s:type, '','\<type\s*$')
+-    else return ind
++      return s:FindLet(s:type, '','\<\(class\|type\)\s*$')
++    else
++      return ind
+     endif
+ 
+   " Indent for pattern matching:
+   elseif line =~ '^\s*|'
+-    if lline !~ '^\s*\(|\|\(match\|with\|type\)\>\)\|\<\(function\|parser\|with\)\s*$'
++    if lline !~ '^\s*\(|[^\]]\|\(match\|type\|with\)\>\)\|\<\(function\|parser\|private\|with\)\s*$'
+       call search('|', 'bW')
+-      return indent(searchpair('^\s*\(type\|match\)\>\|\<\(with\|function\|parser\)\s*$', '', '|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "\\[|\\||\\]" && getline(".") !~ "^\\s*|.*->"'))
+-    else return ind
++      return indent(searchpair('^\s*\(match\|type\)\>\|\<\(function\|parser\|private\|with\)\s*$', '', '^\s*|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") !~ "^\\s*|.*->"'))
++    else
++      return ind
+     endif
+ 
+   " Indent if current line begins with ';;':
+   elseif line =~ '^\s*;;'
+     if lline !~ ';;\s*$'
+       return s:GetInd(v:lnum, s:letpat, s:letlim)
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'in' and previous
+-  " line does not start with 'let' or 'and':
++  " Indent if current line begins with 'in':
+   elseif line =~ '^\s*in\>'
+     if lline !~ '^\s*\(let\|and\)\>'
+       return s:FindPair('\<let\>', '', '\<in\>')
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'else'
+-  " and previous line does not start with 'if', 'then' or 'else':
++  " Indent if current line begins with 'else':
+   elseif line =~ '^\s*else\>'
+-    if lline !~ '^\s*\(if\|else\|then\)\>'
++    if lline !~ '^\s*\(if\|then\)\>'
+       return s:FindPair('\<if\>', '', '\<else\>')
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'then'
+-  " and previous line does not start with 'if', 'then' or 'else':
++  " Indent if current line begins with 'then':
+   elseif line =~ '^\s*then\>'
+-    if lline !~ '^\s*\(if\|else\|then\)\>'
++    if lline !~ '^\s*\(if\|else\)\>'
+       return s:FindPair('\<if\>', '', '\<then\>')
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Subtract a 'shiftwidth' if current line begins with 'and' and previous
+-  " line does not start with 'let', 'and' or 'type' or end with 'end'
+-  " (for classes):
++  " Indent if current line begins with 'and':
+   elseif line =~ '^\s*and\>'
+     if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$'
+       return ind - &sw
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'with'
+-  " and previous line does not start with 'match' or 'try':
++  " Indent if current line begins with 'with':
+   elseif line =~ '^\s*with\>'
+     if lline !~ '^\s*\(match\|try\)\>'
+       return s:FindPair('\<\%(match\|try\)\>', '','\<with\>')
+-    else return ind
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'exception':
+-  elseif line =~ '^\s*exception\>'
++  " Indent if current line begins with 'exception', 'external', 'include' or
++  " 'open':
++  elseif line =~ '^\s*\(exception\|external\|include\|open\)\>'
+     if lline !~ s:lim . '\|' . s:letlim
+-      return indent(search(s:val . '\|^\s*\(external\|include\|open\|type\)\>', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent if current line begins with 'external':
+-  elseif line =~ '^\s*external\>'
+-    if lline !~ s:lim . '\|' . s:letlim
+-      return indent(search(s:val . '\|^\s*\(exception\|include\|open\|type\)\>', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent if current line begins with 'include':
+-  elseif line =~ '^\s*include\>'
+-    if lline !~ s:lim . '\|' . s:letlim
+-      return indent(search(s:val . '\|^\s*\(exception\|external\|open\|type\)\>', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent if current line begins with 'open':
+-  elseif line =~ '^\s*open\>'
+-    if lline !~ s:lim . '\|' . s:letlim
+-      return indent(search(s:val . '\|^\s*\(exception\|external\|include\|type\)\>', 'bW'))
+-    else return ind
++      call search(line)
++      return indent(search('^\s*\(\(exception\|external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
++    else
++      return ind
+     endif
+ 
+   " Indent if current line begins with 'val':
+   elseif line =~ '^\s*val\>'
+     if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim
+-      return indent(search(s:val . '\|^\s*\(exception\|include\|initializer\|method\|open\|type\)\>', 'bW'))
+-    else return ind
++      return indent(search('^\s*\(\(exception\|include\|initializer\|method\|open\|type\|val\)\>\|external\>.*:\)', 'bW'))
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'constraint':
+-  elseif line =~ '^\s*constraint\>'
++  " Indent if current line begins with 'constraint', 'inherit', 'initializer'
++  " or 'method':
++  elseif line =~ '^\s*\(constraint\|inherit\|initializer\|method\)\>'
+     if lline !~ s:obj
+-      return indent(search('^\s*\(inherit\|initializer\|method\|val\)\>', 'bW'))
+-    else return ind
++      return indent(search('\<\(object\|object\s*(.*)\)\s*$', 'bW')) + &sw
++    else
++      return ind
+     endif
+ 
+-  " Indent if current line begins with 'inherit':
+-  elseif line =~ '^\s*inherit\>'
+-    if lline !~ s:obj
+-      return indent(search('^\s*\(constraint\|initializer\|method\|val\)\>', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent if current line begins with 'inherit':
+-  elseif line =~ '^\s*initializer\>'
+-    if lline !~ s:obj
+-      return indent(search('^\s*\(constraint\|inherit\|method\|val\)\>', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent if current line begins with 'method':
+-  elseif line =~ '^\s*method\>'
+-    if lline !~ s:obj
+-      return indent(search('^\s*\(\(constraint\|inherit\|initializer\|val\)\>\|method\>.*\(:\|=\)\)', 'bW'))
+-    else return ind
+-    endif
+-
+-  " Indent back to normal after comments:
+-  elseif line =~ '^\s*\*)'
+-    call search('\*)', 'bW')
+-    return indent(searchpair('(\*', '', '\*)', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'))
+-
+   endif
+ 
+   " Add a 'shiftwidth' after lines ending with:
+-  if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|struct\|sig\|functor\|initializer\|object\|try\|do\|if\|then\|else\|fun\|function\|parser\)\|\<object\s*(.*)\)\s*$'
++  if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|parser\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
+     let ind = ind + &sw
+ 
+   " Back to normal indent after lines ending with ';;':
+@@ -297,10 +255,14 @@
+   elseif lline =~ ')\s*$'
+     let ind = s:FindPair('(', '',')')
+ 
++  " If this is a multiline comment then align '*':
++  elseif lline =~ '^\s*(\*' && line =~ '^\s*\*'
++    let ind = ind + 1
++
+   endif
+ 
+   " Subtract a 'shiftwidth' after lines matching 'match ... with parser':
+-  if lline =~ '^\s*match\>.*\<with\>\s*\<parser\s*$'
++  if lline =~ '\<match\>.*\<with\>\s*\<parser\s*$'
+     let ind = ind - &sw
+   endif
+ 
+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 @@
+ " Vim syntax file
+ " Language:     OCaml
+ " Filenames:    *.ml *.mli *.mll *.mly
+-" Maintainers:  Markus Mottl      <markus@oefai.at>
+-"		Karl-Heinz Sylla  <Karl-Heinz.Sylla@gmd.de>
+-"		Issac Trotts	  <<ijtrotts@ucdavis.edu>
+-" URL:		http://www.oefai.at/~markus/vim/syntax/ocaml.vim
+-" Last Change:	2003 May 04
+-"		2002 Oct 24 - Small fix for "module type" (MM)
+-"		2002 Jun 16 - Added "&&", "<" and ">" as operators (MM)
++" Maintainers:  Markus Mottl      <markus.mottl@gmail.com>
++"               Karl-Heinz Sylla  <Karl-Heinz.Sylla@gmd.de>
++"               Issac Trotts      <ijtrotts@ucdavis.edu>
++" URL:          http://www.ocaml.info/vim/syntax/ocaml.vim
++" Last Change:  2005 Mar 15 - Added a patch from David Baelde (MM)
++"               2004 Aug 13 - Added new type keywords (MM)
++"               2004 Jul 30 - Added script keyword "thread" (MM)
++
++" A minor patch was applied to the official version so that object/end
++" can be distinguished from begin/end, which is used for indentation,
++" and folding. (David Baelde)
+ 
+ " For version 5.x: Clear all syntax items
+ " For version 6.x: Quit when a syntax file was already loaded
+@@ -24,7 +28,7 @@
+ syn match    ocamlComment   "^#!.*"
+ 
+ " Scripting directives
+-syn match    ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>"
++syn match    ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>"
+ 
+ " lowercase identifier - the standard way to match
+ syn match    ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/
+@@ -78,7 +82,7 @@
+ 
+ 
+ " Objects
+-syn region   ocamlEnd matchgroup=ocamlKeyword start="\<object\>" matchgroup=ocamlKeyword end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
++syn region   ocamlEnd matchgroup=ocamlObject start="\<object\>" matchgroup=ocamlObject end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
+ 
+ 
+ " Blocks
+@@ -163,8 +167,9 @@
+   syn match    ocamlKeyChar  "!"
+ endif
+ 
+-syn keyword  ocamlType     array bool char exn float format int
+-syn keyword  ocamlType     list option string unit
++syn keyword  ocamlType     array bool char exn float format format4
++syn keyword  ocamlType     int int32 int64 lazy_t list nativeint option
++syn keyword  ocamlType     string unit
+ 
+ syn keyword  ocamlOperator asr lor lsl lsr lxor mod not
+ 
+@@ -203,20 +208,20 @@
+ syn match    ocamlKeyChar      "="
+ 
+ if exists("ocaml_revised")
+-  syn match    ocamlErr		"<-"
++  syn match    ocamlErr        "<-"
+ else
+-  syn match    ocamlOperator	"<-"
++  syn match    ocamlOperator   "<-"
+ endif
+ 
+-syn match    ocamlNumber	"\<-\=\d\+\>"
+-syn match    ocamlNumber	"\<-\=0[x|X]\x\+\>"
+-syn match    ocamlNumber	"\<-\=0[o|O]\o\+\>"
+-syn match    ocamlNumber	"\<-\=0[b|B][01]\+\>"
+-syn match    ocamlFloat		"\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
++syn match    ocamlNumber        "\<-\=\d\+\>"
++syn match    ocamlNumber        "\<-\=0[x|X]\x\+\>"
++syn match    ocamlNumber        "\<-\=0[o|O]\o\+\>"
++syn match    ocamlNumber        "\<-\=0[b|B][01]\+\>"
++syn match    ocamlFloat         "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
+ 
+ " Labels
+-syn match    ocamlLabel		"\~\(\l\|_\)\(\w\|'\)*"lc=1
+-syn match    ocamlLabel		"?\(\l\|_\)\(\w\|'\)*"lc=1
++syn match    ocamlLabel        "\~\(\l\|_\)\(\w\|'\)*"lc=1
++syn match    ocamlLabel        "?\(\l\|_\)\(\w\|'\)*"lc=1
+ syn region   ocamlLabel transparent matchgroup=ocamlLabel start="?(\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr
+ 
+ 
+@@ -252,62 +257,63 @@
+     command -nargs=+ HiLink hi def link <args>
+   endif
+ 
+-  HiLink ocamlBraceErr	   Error
+-  HiLink ocamlBrackErr	   Error
+-  HiLink ocamlParenErr	   Error
+-  HiLink ocamlArrErr	   Error
++  HiLink ocamlBraceErr     Error
++  HiLink ocamlBrackErr     Error
++  HiLink ocamlParenErr     Error
++  HiLink ocamlArrErr       Error
+ 
+   HiLink ocamlCommentErr   Error
+ 
+-  HiLink ocamlCountErr	   Error
+-  HiLink ocamlDoErr	   Error
+-  HiLink ocamlDoneErr	   Error
+-  HiLink ocamlEndErr	   Error
+-  HiLink ocamlThenErr	   Error
++  HiLink ocamlCountErr     Error
++  HiLink ocamlDoErr        Error
++  HiLink ocamlDoneErr      Error
++  HiLink ocamlEndErr       Error
++  HiLink ocamlThenErr      Error
+ 
+-  HiLink ocamlCharErr	   Error
++  HiLink ocamlCharErr      Error
+ 
+-  HiLink ocamlErr	   Error
++  HiLink ocamlErr          Error
+ 
+-  HiLink ocamlComment	   Comment
++  HiLink ocamlComment      Comment
+ 
+-  HiLink ocamlModPath	   Include
+-  HiLink ocamlModule	   Include
++  HiLink ocamlModPath      Include
++  HiLink ocamlObject	   Include
++  HiLink ocamlModule       Include
+   HiLink ocamlModParam1    Include
+-  HiLink ocamlModType	   Include
+-  HiLink ocamlMPRestr3	   Include
+-  HiLink ocamlFullMod	   Include
++  HiLink ocamlModType      Include
++  HiLink ocamlMPRestr3     Include
++  HiLink ocamlFullMod      Include
+   HiLink ocamlModTypeRestr Include
+-  HiLink ocamlWith	   Include
+-  HiLink ocamlMTDef	   Include
++  HiLink ocamlWith         Include
++  HiLink ocamlMTDef        Include
+ 
+-  HiLink ocamlScript	   Include
++  HiLink ocamlScript       Include
+ 
+   HiLink ocamlConstructor  Constant
+ 
+   HiLink ocamlModPreRHS    Keyword
+-  HiLink ocamlMPRestr2	   Keyword
+-  HiLink ocamlKeyword	   Keyword
+-  HiLink ocamlFunDef	   Keyword
++  HiLink ocamlMPRestr2     Keyword
++  HiLink ocamlKeyword      Keyword
++  HiLink ocamlFunDef       Keyword
+   HiLink ocamlRefAssign    Keyword
+-  HiLink ocamlKeyChar	   Keyword
+-  HiLink ocamlAnyVar	   Keyword
+-  HiLink ocamlTopStop	   Keyword
+-  HiLink ocamlOperator	   Keyword
++  HiLink ocamlKeyChar      Keyword
++  HiLink ocamlAnyVar       Keyword
++  HiLink ocamlTopStop      Keyword
++  HiLink ocamlOperator     Keyword
+ 
+-  HiLink ocamlBoolean	   Boolean
++  HiLink ocamlBoolean      Boolean
+   HiLink ocamlCharacter    Character
+-  HiLink ocamlNumber	   Number
+-  HiLink ocamlFloat	   Float
+-  HiLink ocamlString	   String
++  HiLink ocamlNumber       Number
++  HiLink ocamlFloat        Float
++  HiLink ocamlString       String
+ 
+-  HiLink ocamlLabel	   Identifier
++  HiLink ocamlLabel        Identifier
+ 
+-  HiLink ocamlType	   Type
++  HiLink ocamlType         Type
+ 
+-  HiLink ocamlTodo	   Todo
++  HiLink ocamlTodo         Todo
+ 
+-  HiLink ocamlEncl	   Keyword
++  HiLink ocamlEncl         Keyword
+ 
+   delcommand HiLink
+ endif

Added: trunk/vim/debian/patches/302_message.c.diff
===================================================================
--- trunk/vim/debian/patches/302_message.c.diff	2005-03-26 12:53:43 UTC (rev 115)
+++ trunk/vim/debian/patches/302_message.c.diff	2005-03-26 12:55:45 UTC (rev 116)
@@ -0,0 +1,12 @@
+diff -Nur vim63.orig/src/message.c vim63/src/message.c
+--- vim63.orig/src/message.c	2005-03-26 12:33:36.747667152 +0100
++++ vim63/src/message.c	2005-03-26 12:34:52.374170176 +0100
+@@ -905,7 +905,7 @@
+ 	     * CTRL-C, but we need to loop then. */
+ 	    had_got_int = got_int;
+ 	    c = safe_vgetc();
+-	    if (!global_busy)
++	    if (had_got_int && !global_busy)
+ 		got_int = FALSE;
+ #ifdef FEAT_CLIPBOARD
+ 	    /* Strange way to allow copying (yanking) a modeless selection at

Modified: trunk/vim/debian/rules
===================================================================
--- trunk/vim/debian/rules	2005-03-26 12:53:43 UTC (rev 115)
+++ trunk/vim/debian/rules	2005-03-26 12:55:45 UTC (rev 116)
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f 
 
 export DH_OPTIONS=
-export DH_COMPAT=4
 
 DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
 
@@ -106,6 +105,9 @@
   VARIANTS_SKIP+=kvim-ruby
   VARIANTS_SKIP+=kvim-tcl
 endif
+ifeq ($(origin VARIANT), command line)
+  VARIANTS = vim-basic $(VARIANT)
+endif
 
 CFLAGS_vim-basic=$(CFLAGS)
 CFGFLAGS_vim-basic=$(CFGFLAGS) $(OPTFLAGS) --without-x --enable-gui=no
@@ -160,7 +162,7 @@
 	mv $(SRCDIR) $(SRCDIR).new
 	rm -f extract-stamp*
 	./debian/rules extract
-	diff -urN $(SRCDIR) $(SRCDIR).new > new.diff
+	- diff -urN $(SRCDIR) $(SRCDIR).new > new.diff
 	rm -rf $(SRCDIR)
 	mv $(SRCDIR).new $(SRCDIR)