Module Ecaml__.Current_buffer0

include Ecaml__.Current_buffer0_intf.Current_buffer0
include Ecaml__.Current_buffer0_intf.Current_buffer0_public
val get : unit -> Ecaml__.Buffer0.t

(describe-function 'current-buffer)

val set : Ecaml__.Buffer0.t -> unit

(describe-function 'set-buffer)

val set_temporarily : (_'a) Ecaml.Sync_or_async.t -> Ecaml__.Buffer0.t -> f:(unit -> 'a) -> 'a

set_temporarily t ~f runs f with the current buffer set to t. (describe-function 'with-current-buffer).

val variable_is_defined : Ecaml.Symbol.t -> bool

(describe-function 'boundp)

variable_is_defined can be locally false in a buffer but true for that symbol globally, so it is defined in Current_buffer.

val symbol_value : Ecaml.Symbol.t -> Ecaml__.Import0.Value.t

(describe-function 'symbol-value)

val value : 'a Ecaml.Var.t -> 'a option

(describe-function 'symbol-value)

val value_exn : 'a Ecaml.Var.t -> 'a

(describe-function 'symbol-value)

val value_opt_exn : 'a option Ecaml.Var.t -> 'a

value_opt_exn is like value_exn, except that it raises if the variable is defined but None. This is useful for buffer-local variables of type 'a option, with a default value of nil.

val set_value : 'a Ecaml.Var.t -> 'a -> unit

(describe-function 'set)

val set_values : Ecaml.Var.And_value.t list -> unit
val clear_value : 'a Ecaml.Var.t -> unit

(describe-function 'makunbound)

val set_value_temporarily : (_'b) Ecaml.Sync_or_async.t -> 'a Ecaml.Var.t -> 'a -> f:(unit -> 'b) -> 'b
val set_values_temporarily : (_'a) Ecaml.Sync_or_async.t -> Ecaml.Var.And_value.t list -> f:(unit -> 'a) -> 'a
val has_non_null_value : _ Ecaml.Var.t -> bool

(describe-function 'bound-and-true-p)