# HG changeset patch
# User Marc Weber <marco-oweber@gmx.de>
# Date 1372460582 -7200
#      Sat Jun 29 01:03:02 2013 +0200
# Node ID 81d639373cee7c5405b820e5e8fe3babfdaff2fa
# Parent  ed4edcdeff2b124f4144463ab569a34addf2128f
move ocaml errorformat to compiler

diff -r ed4edcdeff2b -r 81d639373cee runtime/compiler/ocaml.vim
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/compiler/ocaml.vim	Sat Jun 29 01:03:02 2013 +0200
@@ -0,0 +1,38 @@
+" Vim Compiler File
+" Compiler:	ocaml
+" Maintainer:	See ftplugin/ocaml.vim (?)
+" Last Change:	June 2013 by Marc Weber
+"
+" Marc Weber's comments:
+" setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
+" ocamake and whatnot. So which one to use?
+"
+" This error format was moved from ftplugin/ocaml.vim to this file,
+" because ftplugin is the wrong file to set an error format
+" and the error format itself is annoying because it joins many lines in this
+" error case:
+"
+"    Error: The implementation foo.ml does not match the interface foo.cmi:
+"    Modules do not match case.
+"
+" So having it here makes people opt-in
+
+
+if exists("current_compiler")
+    finish
+endif
+let current_compiler = "ant"
+
+CompilerSet errorformat =
+      \%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,
+      \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
+      \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
+      \%D%*\\a:\ Entering\ directory\ `%f',
+      \%X%*\\a:\ Leaving\ directory\ `%f',
+      \%DMaking\ %*\\a\ in\ %f
diff -r ed4edcdeff2b -r 81d639373cee runtime/ftplugin/ocaml.vim
--- a/runtime/ftplugin/ocaml.vim	Fri Jun 28 23:04:42 2013 +0200
+++ b/runtime/ftplugin/ocaml.vim	Sat Jun 29 01:03:02 2013 +0200
@@ -13,6 +13,10 @@
 "              (Pierre Vittet)
 "              2010 Jul 10 - Bugfix, thanks to Pat Rondon
 "              2008 Jul 17 - Bugfix related to fnameescape (VA)
+"              2013 Jul - moving errorformat into compiler/ocaml.vim Marc Weber
+"
+" Marc Weber's comment: This file may contain a lot of (very custom) stuff
+" which eventually should be moved somewhere else ..
 
 if exists("b:did_ftplugin")
   finish
@@ -33,19 +37,6 @@
 " Error handling -- helps moving where the compiler wants you to go
 let s:cposet=&cpoptions
 set cpo&vim
-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,
-      \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
-      \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
-      \%D%*\\a:\ Entering\ directory\ `%f',
-      \%X%*\\a:\ Leaving\ directory\ `%f',
-      \%DMaking\ %*\\a\ in\ %f
 
 " Add mappings, unless the user didn't want this.
 if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
diff -r ed4edcdeff2b -r 81d639373cee runtime/indent/ocaml.vim
--- a/runtime/indent/ocaml.vim	Fri Jun 28 23:04:42 2013 +0200
+++ b/runtime/indent/ocaml.vim	Sat Jun 29 01:03:02 2013 +0200
@@ -7,6 +7,10 @@
 " Last Change:  2010 Sep 04 - Added an indentation improvement by Mark Weber
 "               2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
 "               2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
+"               2013 June   - commented textwidth (Marc Weber)
+"
+" Marc Weber's comment: This file may contain a lot of (very custom) stuff
+" which eventually should be moved somewhere else ..
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -19,7 +23,9 @@
 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
+
+" At least Marc Weber and Markus Mottl are annoyed by this:
+" setlocal textwidth=80
 
 " Comment formatting
 if !exists("no_ocaml_comments")
