package ecaml

  1. Overview
  2. Docs
Library for writing Emacs plugin in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

ecaml-v0.13.0.tar.gz
sha256=20de8c606f4d0aea48c9353d1202c388fdd5d9faecb22799e46b5e2f2f8a4458
md5=4f58053a70cb5be73c8d98abacaab3a9

doc/ecaml.ecaml_value/Ecaml_value/Ecaml_callback/index.html

Module Ecaml_value.Ecaml_callback

This module is used to enforce the expected types of registered callbacks.

type 'a t
val register : 'a t -> f:'a -> should_run_holding_async_lock:bool -> unit
val dispatch_function : (Ecaml_value__.Caml_embedded_id.t -> Value.t array -> Value.t) t

dispatch_function is how Emacs calls from C to OCaml.

val end_of_module_initialization : (unit -> unit) t

The C code arranges to call end_of_module_initialization at the end of emacs_module_init, which is what Emacs calls to initialize an Ecaml plugin. This is after all the other top-level OCaml code has run.

val free_embedded_caml_values : (Ecaml_value__.Caml_embedded_id.t array -> unit) t

free_embedded_caml_values removes entries for any embeded ocaml values that are not longer used in emacs and are scheduled to be removed. The function runs whenever we enter OCaml from emacs, provided of course that there are values to collect.

val report_exn_when_calling_callback : exn -> unit

report_exn_when_calling_callback is called when the infrastructure that calls a callbacks raises. This is a rare situation, e.g. Out_of_memory.

val initialize_module : unit
OCaml

Innovation. Community. Security.