Legend:
Library
Module
Module type
Parameter
Class
Class type
There are, in general, many buffers in an Emacs session. At any time, one of them is designated as the "current buffer". This is the buffer in which most editing takes place, because most of the primitives for examining or changing text in a buffer operate implicitly on the current buffer. Normally the buffer that is displayed on the screen in the selected window is the current buffer, but this is not always so: a program can temporarily designate any buffer as current in order to operate on its contents, without changing what is displayed on the screen.
(Info-goto-node "(elisp)Current Buffer").
val get : unit ->Ecaml_value__.Value0.t
(describe-function 'current-buffer)
val set : Ecaml_value__.Value0.t-> unit
(describe-function 'set-buffer)
val set_temporarily :
(_, 'a)Sync_or_async.t->Ecaml_value__.Value0.t->f:(unit ->'a)->'a
set_temporarily t ~f runs f with the current buffer set to t. (describe-function 'with-current-buffer).
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_temporarily_to_temp_buffer :
?name:string ->(_, 'a)Sync_or_async.t->(unit ->'a)->'a
set_temporarily_to_temp_buffer f creates a temporary buffer and runs f with the current buffer set to the temporary buffer. (describe-function 'with-temp-buffer).
val save_current_buffer : (_, 'a)Sync_or_async.t->(unit ->'a)->'a
(describe-function 'save-current-buffer)
val save_excursion : (_, 'a)Sync_or_async.t->(unit ->'a)->'a
(describe-function 'save-excursion)
val save_mark_and_excursion : (_, 'a)Sync_or_async.t->(unit ->'a)->'a
(describe-function 'save-mark-and-excursion)
val save_restriction : (_, 'a)Sync_or_async.t->(unit ->'a)->'a
(describe-function 'save-restriction)
val set_multibyte : bool -> unit
(describe-function 'set-buffer-multibyte). (Info-goto-node "(elisp)Selecting a Representation").
val is_multibyte : unit -> bool
(describe-variable 'enable-multibyte-characters).
val rename_exn : ?unique:bool ->unit ->name:string -> unit
rename_exn renames the current buffer, raising if name is already taken and unique = false; with unique = true it generates a new name. (describe-function
'rename-buffer).
val set_text_property_staged :
'aText.Property_name.t->'a->(start:int ->end_:int -> unit)Core.Staged.t
set_text_property_staged is an optimization of set_text_property for the same text property on a number of regions, where the positions are ints. It precomputes the Elisp property value once, and reuses it for each region.
val set_text_properties_staged :
Text.Property.t list->(start:int ->end_:int -> unit)Core.Staged.t
set_text_properties_staged is an optimization of set_text_properties for the same text property on a number of regions, where the positions are ints. It precomputes the Elisp property value once, and reuses it for each region.
val add_text_properties_staged :
Text.Property.t list->(start:int ->end_:int -> unit)Core.Staged.t
add_text_properties_staged is an optimization of add_text_properties for the same text property on a number of regions, where the positions are ints. It precomputes the Elisp property value once, and reuses it for each region.
text_property_is_present property_name returns true if any text in the region from start to end_ uses property_name. (describe-function
'text-property-not-all)
(describe-function 'replace-buffer-contents) This function was introduced in Emacs 26 and the value is an error if an earlier version of emacs is used.
val replace_string :
?start:Position.t->?end_:Position.t->from:string ->to_:string ->unit ->
unit
replace_string ~from ~to_ replaces all occurrences of from with to_. It is like (describe-function 'replace-string), but doesn't actually call that, because its documentation says:
This function is for interactive use only;
in Lisp code use `search-forward' and `replace-match' instead.