package ecaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file current_buffer0_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
open! Core_kernel
open! Import0

module type Current_buffer0_public = sig
  (** [(describe-function 'current-buffer)] *)
  val get : unit -> Buffer0.t

  (** [(describe-function 'set-buffer)] *)
  val set : Buffer0.t -> unit

  (** [set_temporarily t ~f] runs [f] with the current buffer set to [t].
      [(describe-function 'with-current-buffer)]. *)
  val set_temporarily : Buffer0.t -> f:(unit -> 'a) -> 'a

  (** [(describe-function 'symbol-value)] *)
  val symbol_value : Symbol.t -> Value.t

  (** [(describe-function 'symbol-value)   ] *)
  val value : 'a Var.t -> 'a option

  (** [(describe-function 'symbol-value)   ] *)
  val value_exn : 'a 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 value_opt_exn : 'a option Var.t -> 'a

  (** [(describe-function 'set)]. *)
  val set_value : 'a Var.t -> 'a -> unit

  val set_values : Var.And_value.t list -> unit

  (** [(describe-function 'makunbound)] *)
  val clear_value : 'a Var.t -> unit

  val set_value_temporarily : 'a Var.t -> 'a -> f:(unit -> 'b) -> 'b
  val set_values_temporarily : Var.And_value.t list -> f:(unit -> 'a) -> 'a

  (** [(describe-function 'bound-and-true-p]. *)
  val has_non_null_value : _ Var.t -> bool
end

module type Current_buffer0 = sig
  include Current_buffer0_public

  module Q : sig
    include module type of Q

    val boundp : Symbol.t
    val current_buffer : Symbol.t
    val makunbound : Symbol.t
    val set_buffer : Symbol.t
  end
end
OCaml

Innovation. Community. Security.