Module Ecaml__.Buffer_local
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
val symbol : _ t -> Ecaml.Symbol.tval var : 'a t -> 'a Ecaml.Var.tval defvar : Ecaml.Symbol.t -> Core.Source_code_position.t -> ?docstring:string -> type_:'a Ecaml__.Import.Value.Type.t -> default_value:'a -> unit -> 'a tdefvardefines a buffer-local variable usingDefvar.defvar, and callsVar.make_buffer_local_always.
val wrap_existing : ?make_buffer_local_always:bool -> Ecaml.Symbol.t -> 'a Ecaml__.Import.Value.Type.t -> 'a twrap_existing vartakes a variable defined in Elisp and makes it available as aBuffer_local.t. Ifmake_buffer_local_always = false, thenwrap_existingraises ifVar.is_buffer_local_always var = false. Ifmake_buffer_local_always = true, thenwrap_existingcallsVar.make_buffer_local_always var.
module Wrap : sig ... endIdiomatic usage of
Wraplooks like:
val defvar_embedded : Ecaml.Symbol.t -> Core.Source_code_position.t -> ?docstring:string -> (module Ecaml__.Buffer_local_intf.Defvar_embedded_arg with type t = 'a) -> 'a option tdefvar_embeddeddefines a buffer-local variable whose Elisp representation is an opaque pointer to an OCaml value, viaCaml_embed.create_type. This allows one to store an arbitrary OCaml value in a buffer local, without any conversions between OCaml and Elisp.
val get : 'a t -> Ecaml__.Import.Buffer.t -> 'aval get_exn : 'a option t -> Ecaml__.Import.Buffer.t -> 'aval set : 'a t -> 'a -> Ecaml__.Import.Buffer.t -> unitval update_exn : 'a option t -> Ecaml__.Import.Buffer.t -> f:('a -> 'a) -> unitval set_permanent : _ t -> bool -> unitA permanent buffer-local variable is unaffected by
kill-all-local-variables, and so it is not cleared by changing major modes. See(Info-goto-node "(elisp)Creating Buffer-Local").
val is_permanent : _ t -> bool
module Private : sig ... end