package ecaml
Library for writing Emacs plugin in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=87e76473915e12d718096100a5c4d15d98aba6f99ecbf21814b7389e8c28bb25
doc/src/ecaml/defvar.ml.html
Source file defvar.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 56 57 58 59 60 61 62
open! Core open! Import let all_defvar_symbols = ref [] module Private = struct let all_defvar_symbols () = !all_defvar_symbols |> List.sort ~compare:Symbol.compare_name ;; end let add_to_load_history symbol here = all_defvar_symbols := symbol :: !all_defvar_symbols; Load_history.add_entry here (Var symbol) ;; let defvaralias = Funcall.Wrap.("defvaralias" <: Symbol.t @-> Symbol.t @-> nil_or string @-> return nil) ;; let defvaralias symbol here ?docstring ~alias_of () = defvaralias symbol alias_of docstring; add_to_load_history symbol here ;; let define_obsolete_alias obsolete here ?docstring ~alias_of ~since () = defvaralias obsolete here ?docstring ~alias_of (); Obsolete.make_variable_obsolete obsolete ~current:(Some alias_of) ~since ;; let defvar symbol here ~docstring ~type_ ~initial_value ?(include_in_all_defvar_symbols = true) () = let symbol = match Symbol.Automatic_migration.migrate ~old:symbol with | None -> symbol | Some { new_; since } -> define_obsolete_alias symbol here ~alias_of:new_ ~since (); new_ in let docstring = docstring |> String.strip in require_nonempty_docstring here ~docstring; ignore (Form.Blocking.eval ([ Q.defvar |> Symbol.to_value ; symbol |> Symbol.to_value ; Value.list [ Symbol.to_value Q.quote; initial_value |> Value.Type.to_value type_ ] ; docstring |> Value.of_utf8_bytes ] |> Value.list |> Form.of_value_exn) : Value.t); if include_in_all_defvar_symbols then add_to_load_history symbol here; Var.create symbol type_ ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>