1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798(*********************************************************************************)(* Chamo *)(* *)(* Copyright (C) 2003-2021 Institut National de Recherche en Informatique *)(* et en Automatique. All rights reserved. *)(* *)(* This program is free software; you can redistribute it and/or modify *)(* it under the terms of the GNU Lesser General Public License version *)(* 3 as published by the Free Software Foundation. *)(* *)(* 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 *)(* *)(* Contact: Maxence.Guesdon@inria.fr *)(* *)(*********************************************************************************)letmode_name="ocaml"letincludes_global_var=mode_name^"_includes"letrc_file=Sourceview_rc.mode_rc_filemode_nameletlocal_rc_file=Sourceview_rc.local_mode_rc_filemode_nameletgroup=refOcf.groupletadd_to_grouppatho=group:=Ocf.add!grouppatholetgroup()=!groupletx=1-1letdefault_key_bindings=letmoduleK=Tsdl.Sdl.KinletmoduleKmod=Tsdl.Sdl.KmodinRc.to_keystates[[0,K.tab],mode_name^"_indent_line";[Kmod.ctrl,K.x;Kmod.ctrl,K.tab],mode_name^"_indent_buffer";[Kmod.ctrl,K.x;Kmod.ctrl,K.a],mode_name^"_switch_file";[Kmod.ctrl,K.o;Kmod.ctrl,K.c],mode_name^"_build";[Kmod.alt,K.t],mode_name^"_display_type_annot";[Kmod.(ctrl+alt),K.t],mode_name^"_copy_type_annot";[Kmod.alt,K.c],mode_name^"_display_call_annot";[Kmod.alt,K.i],mode_name^"_display_ident_annot";[Kmod.alt,K.j],mode_name^"_jump_to_local_def";[Kmod.(ctrl+alt),K.c],mode_name^"_show_stack_calls";[Kmod.(ctrl+alt),K.x],mode_name^"_expand_ext_idents";]letkey_bindings=leto=Ocf.listConfig.binding_wrappers~doc:"Key bindings"default_key_bindingsinadd_to_group["key_bindings"]o;oletstack_call_bgcolor=leto=Ocf.option~doc:"Background color of non-tail calls"Stk.Color.ocf_wrapperStk.Color.redinadd_to_group["stack_call_colors";"background"]o;oletstack_call_fgcolor=leto=Ocf.option~doc:"Foreground color of non-tail calls"Stk.Color.ocf_wrapperStk.Color.yellowinadd_to_group["stack_call_colors";"foreground"]o;oletread()=Ocf.from_file(group())rc_fileletwrite()=Ocf.to_file(group())rc_filelet(add_sourceview_mode_ocaml_key_binding,add_sourceview_mode_ocaml_key_binding_string)=Sourceview_rc.create_add_sourceview_mode_binding_commandskey_bindingsmode_name;;letlocal_group=refOcf.groupletadd_to_local_grouppatho=local_group:=Ocf.add!local_grouppatholetlocal_group()=!local_groupletocamlbuild_commands=leto=Ocf.listOcf.Wrapper.(pairstringstring)~doc:"ocamlbuild commands associated to edited files"[]inadd_to_local_group["ocamlbuild_commands"]o;oletlocal_read()=Ocf.from_file(local_group())local_rc_file;;letlocal_write()=Ocf.to_file(local_group())local_rc_file;;