@@ -20,8 +20,6 @@ set cpo&vim
2020
2121" Checker options {{{1
2222
23- let s: ocamlpp = get (g: , ' syntastic_ocaml_camlp4r' , 0 ) ? ' camlp4r' : ' camlp4o'
24-
2523if ! exists (' g:syntastic_ocaml_use_ocamlc' ) || ! executable (' ocamlc' )
2624 let g: syntastic_ocaml_use_ocamlc = 0
2725endif
4139" }}}1
4240
4341function ! SyntaxCheckers_ocaml_camlp4o_IsAvailable () dict " {{{1
42+ let s: ocamlpp = get (g: , ' syntastic_ocaml_camlp4r' , 0 ) ? ' camlp4r' : ' camlp4o'
4443 return executable (s: ocamlpp )
4544endfunction " }}}1
4645
@@ -81,31 +80,22 @@ endfunction " }}}1
8180" Utilities {{{1
8281
8382function ! s: GetMakeprg () " {{{2
84- if g: syntastic_ocaml_use_ocamlc
85- return s: GetOcamlcMakeprg ()
86- endif
87-
88- if g: syntastic_ocaml_use_ocamlbuild && isdirectory (' _build' )
89- return s: GetOcamlBuildMakeprg ()
90- endif
91-
92- return s: GetOtherMakeprg ()
83+ return
84+ \ g: syntastic_ocaml_use_ocamlc ? g: syntastic_ocaml_use_ocamlc :
85+ \ (g: syntastic_ocaml_use_ocamlbuild && isdirectory (' _build' )) ? s: GetOcamlcMakeprg () :
86+ \ s: GetOtherMakeprg ()
9387endfunction " }}}2
9488
9589function ! s: GetOcamlcMakeprg () " {{{2
96- if g: syntastic_ocaml_use_janestreet_core
97- let build_cmd = ' ocamlc -I '
98- let build_cmd .= syntastic#util#shexpand (g: syntastic_ocaml_janestreet_core_dir )
99- let build_cmd .= ' -c ' . syntastic#util#shexpand (' %' )
100- return build_cmd
101- else
102- return ' ocamlc -c ' . syntastic#util#shexpand (' %' )
103- endif
90+ let build_cmd = g: syntastic_ocaml_use_janestreet_core ?
91+ \ ' ocamlc -I ' . syntastic#util#shexpand (g: syntastic_ocaml_janestreet_core_dir ) : ' ocamlc'
92+ let build_cmd .= ' -c ' . syntastic#util#shexpand (' %' )
93+ return build_cmd
10494endfunction " }}}2
10595
10696function ! s: GetOcamlBuildMakeprg () " {{{2
10797 return ' ocamlbuild -quiet -no-log -tag annot,' . s: ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
108- \ syntastic#util#shexpand (' %:r' ) . ' .cmi'
98+ \ syntastic#util#shexpand (' %:r' ) . ' .cmi'
10999endfunction " }}}2
110100
111101function ! s: GetOtherMakeprg () " {{{2
0 commit comments