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/symbol_prefix.ml.html
Source file symbol_prefix.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
open! Core open! Import0 include Symbol_prefix_intf type t = string [@@deriving sexp_of] module type S = S with type t := t let create elisp_name = (module struct let elisp_name = elisp_name let symbol_prefix = concat [ elisp_name; "-" ] let all_commands = Lazy.from_fun (fun () -> let result = ref [] in Obarray.iter Obarray.standard ~f:(fun symbol -> let name = Symbol.name symbol in if Value.is_command (symbol |> Symbol.to_value) && String.is_prefix ~prefix:symbol_prefix name then result := symbol :: !result); List.sort !result ~compare:(fun a b -> Comparable.lift [%compare: string] ~f:Symbol.name a b)) ;; let prefixed_symbol_name suffix = match suffix with | "" -> elisp_name | _ -> concat [ symbol_prefix; suffix ] ;; let symbol suffix = if Lazy.is_val all_commands then raise_s [%message "[symbol] called after [all_commands] was forced."]; prefixed_symbol_name suffix |> Symbol.intern ;; end : S) ;; let extend t suffix = create (concat [ t; suffix ])
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>