package ecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
val create : Symbol.t -> Core.Source_code_position.t -> docstring:string -> ?should_profile:bool -> hook_type:'a Hook_type.t -> (unit, 'r) Defun.Returns.t -> ('a -> 'r) -> 'a t

create here return_type symbol f defines an emacs function named symbol that runs f when called. It returns an 'a t usable for modifying hooks.

val create_with_self : Symbol.t -> Core.Source_code_position.t -> docstring:string -> hook_type:'a Hook_type.t -> (unit, 'r) Defun.Returns.t -> ('a t -> 'a -> 'r) -> 'a t

create_with_self here return_type symbol f works the same as create, except that the 'a t it returns is also passed as an argument to f.

This is useful, for example, if f wants to remove itself from a hook once it is called.

OCaml

Innovation. Community. Security.