1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950open!Coreopen!ImportmoduleQ=structincludeQletask="ask"|>Symbol.internendmoduleSave_buffers=structmoduleT=structtypet=|Ask|False|True[@@derivingenumerate,sexp_of]endincludeTletask=Q.ask|>Symbol.to_valuelettype_=Value.Type.enum[%message"Grep.Save_buffers.t"](moduleT)(function|Ask->ask|False->Value.nil|True->Value.t);;lett=type_endletlast_buffer=Var.Wrap.("grep-last-buffer"<:nil_orBuffer.t)letsave_buffers=Customization.Wrap.("grep-save-buffers"<:Save_buffers.t)letuse_null_device=Customization.Wrap.("grep-use-null-device"<:bool)letgrep=Funcall.Wrap.("grep"<:string@->returnnil)letgrep~command=(* Prevent [grep] from appending [/dev/null] to the command. *)Current_buffer.set_value_temporarilySync(use_null_device|>Customization.var)false~f:(fun()->grepcommand);;include(valMajor_mode.wrap_existing_with_lazy_keymap"grep-mode"[%here])