Module Ecaml.Thing_at_point
Support for detecting something at point---a filename, URL, what-have-you.
type t=|Defun|Email|Filename|Line|List|NumberAny other "thing" supported by
thing-at-point. Usedefthingto register a new thing type.|Other of Symbol.t|Page|Sentence|SexpAny string containing only characters in
chars, which is a regexp character alternative (i.e. a string that would go between square brackets in a regexp).|String_of of{chars : string;}|Symbol|Url|Whitespace|Word
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val find : ?text_properties:bool -> t -> Text.t optionFind the given kind of thing at point, if any. If
text_propertiesis false, text properties are stripped from the returned string.(describe-function 'thing-at-point)
val forward : ?n:int -> t -> bool(describe-function 'forward-thing)NOTE: Many thing types, including
Otherand several built-in types, don't supportforward.
val bounds : t -> (Position.t * Position.t) option(describe-function 'bounds-of-thing-at-point)
val beginning_exn : t -> unit(describe-function 'beginning-of-thing)
val beginning : t -> boolbeginningtriesbeginning_exnand returns false if it would have raised.
val end_exn : t -> unit(describe-function 'end-of-thing)
val end_ : t -> boolend_triesend_exnand returns false if it would have raised.
val defthing : Symbol.t -> Core_kernel.Source_code_position.t -> bounds:(unit -> (Position.t * Position.t) option) -> tDefine
symbolas a "thing" so thatOther symbolworks as the argument tofind, etc (but notforward). The effect is to define a property of the symbol; so long as that property isn't otherwise used, the symbol can be used for other purposes as well.