123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305(* We export all the Ecaml modules before doing [open!]s, because we want to export Ecaml
modules that shadow [Core] ones. *)moduleAbbrev=AbbrevmoduleAdvice=AdvicemoduleAnsi_color=Ansi_colormoduleAsync_ecaml=Async_ecamlmoduleAuto_mode_alist=Auto_mode_alistmoduleBackground=BackgroundmoduleBackup=BackupmoduleBookmark=BookmarkmoduleBrowse_url=Browse_urlmoduleBuffer=BuffermoduleBuffer_local=Buffer_localmoduleCaml_embed=Ecaml_value.Caml_embedmoduleChar_code=Char_codemoduleClipboard=ClipboardmoduleColor=ColormoduleCommand=CommandmoduleComment=CommentmoduleCompilation=CompilationmoduleCompleting=CompletingmoduleCurrent_buffer=Current_buffermoduleCustomization=CustomizationmoduleDebugger=DebuggermoduleDefconst=DefconstmoduleDefun=DefunmoduleDefvar=DefvarmoduleDirectory=DirectorymoduleDisplay=DisplaymoduleDisplay_property=Display_propertymoduleDocumentation=DocumentationmoduleEcaml_profile=Ecaml_profilemoduleEcho_area=Echo_areamoduleEdiff=EdiffmoduleElisp_gc=Elisp_gcmoduleElisp_time=Elisp_timemoduleEmacs_backtrace=Emacs_backtracemoduleEmacs_version=Emacs_versionmoduleEval=EvalmoduleEvil=EvilmoduleExpect_test_config=Async_ecaml.Expect_test_configmoduleFace=FacemoduleFeature=FeaturemoduleFile=FilemoduleFilename=FilenamemoduleFind_function=Find_functionmoduleForm=Ecaml_value.FormmoduleFrame=FramemoduleFuncall=Ecaml_value.FuncallmoduleFunction=Ecaml_value.FunctionmoduleGrep=GrepmoduleHash_table=Hash_tablemoduleHelp=HelpmoduleHook=HookmoduleInput_event=Input_eventmoduleKey_sequence=Key_sequencemoduleKeymap=KeymapmoduleKill_ring=Kill_ringmoduleLine_and_column=Line_and_columnmoduleLoad=LoadmoduleLoad_history=Load_historymoduleMajor_mode=Major_modemoduleMarker=MarkermoduleMinibuffer=MinibuffermoduleMinor_mode=Minor_modemoduleMode_line=Mode_linemoduleModified_tick=Modified_tickmoduleObarray=ObarraymoduleObsolete=ObsoletemoduleOcaml_or_elisp_value=Ocaml_or_elisp_valuemoduleOrg_table=Org_tablemoduleOverlay=OverlaymodulePlist=PlistmodulePoint=PointmodulePosition=PositionmodulePrint=PrintmoduleProcess=ProcessmoduleRegexp=RegexpmoduleRx=RxmoduleSelected_window=Selected_windowmoduleSymbol=SymbolmoduleSymbol_prefix=Symbol_prefixmoduleSync_or_async=Sync_or_asyncmoduleSyntax_table=Syntax_tablemoduleSystem=SystemmoduleTabulated_list=Tabulated_listmoduleTerminal=TerminalmoduleText=TextmoduleThing_at_point=Thing_at_pointmoduleTimer=TimermoduleUser=UsermoduleValue=Ecaml_value.ValuemoduleValueable=Ecaml_value.ValueablemoduleVar=VarmoduleVariable_watcher=Variable_watchermoduleVector=VectormoduleWindow=WindowmoduleWorking_directory=Working_directoryopen!Coreopen!Async_kernelopen!ImportmoduleQ=QincludeAsync_ecaml.ExportincludeComposition_infixletconcat=concatletdefalias=Defun.defaliasletdefconst=Defconst.defconstletdefconst_i=Defconst.defconst_iletdefcustom=Customization.defcustomletdefgroup=Customization.Group.defgroupletdefine_derived_mode=Major_mode.define_derived_modeletdefine_minor_mode=Minor_mode.define_minor_modeletdefun=Defun.defunletdefun_nullary=Defun.defun_nullaryletdefun_nullary_nil=Defun.defun_nullary_nilletdefvar=Defvar.defvarletdefvaralias=Defvar.defvaraliasletinhibit_messages=Echo_area.inhibit_messagesletlambda=Defun.lambdaletlambda_nullary=Defun.lambda_nullaryletlambda_nullary_nil=Defun.lambda_nullary_nilletmessage=Echo_area.messageletmessagef=Echo_area.messagefletmessage_s=Echo_area.message_sletmessage_text=Echo_area.message_textletprint_s=print_sletraise_string=raise_stringletsec_ns=sec_nsletwrap_message=Echo_area.wrap_messagemoduleReturns=Defun.Returnsletprovide=(Feature.provide[@warning"-3"])letinhibit_read_only=Current_buffer.inhibit_read_onlylet()=ifnotam_running_inline_testthenletmoduleUnix=Core_unixinletshould_reopen_stdin=reftrueinBackground.Clock.every[%here]Time.Span.second(fun()->matchUnix.fstatUnix.stdinwith|_->()|exception_->if!should_reopen_stdinthen(letnew_fd=Unix.openfile"/dev/null"~mode:[O_RDONLY]~perm:0o666inshould_reopen_stdin:=Unix.File_descr.equalnew_fdUnix.stdin;message_s~echo:false[%message.omit_nil"stdin was closed"(should_reopen_stdin:boolref)~recent_keys:(Input_event.recent_commands_and_keys():Input_event.Command_or_key.tarray)]));;let()=defun_nullary_nil("ecaml-close-stdin"|>Symbol.intern)[%here]~docstring:{|
Close file descriptor zero, aka stdin. For testing a bug in `call-process-region'.
|}~interactive:No_arg(fun()->Core_unix.(closestdin));;let()=letecaml_test_raise_name="ecaml-test-raise"inletecaml_test_raise=Funcall.Wrap.(ecaml_test_raise_name<:nil_orint@->returnnil)indefun(ecaml_test_raise_name|>Symbol.intern)[%here]~docstring:{|
For testing Ecaml.
Test raising from a deep call stack of a function defined by an Ecaml [defun].
|}~interactive:No_arg(ReturnsValue.Type.unit)(letopenDefun.Let_syntaxinlet%map_openn=optional"number"intinletn=Option.valuen~default:0inifn<=0thenraise_s[%message"foo""bar""baz"]elseecaml_test_raise(Some(n-1)));defun_nullary_nil("ecaml-test-sentinel-raise"|>Symbol.intern)[%here]~docstring:{|
For testing Ecaml.
Test [Process.set_sentinel] on a sentinel that raises.
|}~interactive:No_arg(fun()->Process.set_sentinel[%here](Process.create"true"[]~name:"true"())(ReturnsValue.Type.unit)~sentinel:(fun~event:_->failwith"some error message"));(* Replace [false] with [true] to define a function for testing
[Minibuffer.read_from]. *)iffalsethen(defun_nullary("ecaml-test-minibuffer-y-or-n-with-timeout"|>Symbol.intern)[%here]~docstring:{|
For testing Ecaml.
Test [Minibuffer.y_or_n_with_timeout].
|}~interactive:No_arg(Returns_deferredValue.Type.unit)(fun()->let%bindint=Minibuffer.y_or_n_with_timeout~prompt:"prompt"~timeout:(Time_ns.Span.second,13)inmessage_s[%message(int:intMinibuffer.Y_or_n_with_timeout.t)];return());defun_nullary("ecaml-test-minibuffer"|>Symbol.intern)[%here]~docstring:{|
For testing Ecaml.
Test [Minibuffer.read_from].
|}~interactive:No_arg(Returns_deferredValue.Type.unit)(fun()->lettest?default_value?(history=Minibuffer.history)?history_pos?initial_contents()~prompt=let%bindresult=Minibuffer.read_from~prompt:(concat[prompt;": "])?initial_contents?default_value~history?history_pos()inmessage(concat["result: ";result]);return()inlet%bind()=test()~prompt:"test 1"inlet%bind()=test()~prompt:"test 2"~default_value:"some-default"inlet%bind()=test()~prompt:"test 3"~initial_contents:"some-contents"intest()~prompt:"test 4"~history:(Minibuffer.History.find_or_create("some-history-list"|>Symbol.intern)[%here])));;let()=defun_nullary_nil("ecaml-show-recent-commands-and-keys"|>Symbol.intern)[%here]~docstring:{|
For debugging.
Show the result of `recent-keys' rendered as Ecaml values.
|}~interactive:No_arg(fun()->message_s[%sexp(Input_event.recent_commands_and_keys():Input_event.Command_or_key.tarray)]);;letdebug_embedded_caml_values()=Caml_embed.debug_sexp()moduleRef=structincludeRefletset_temporarily_asyncra~f=letold=!rinr:=a;Monitor.protectf~finally:(fun()->r:=old;return());;end