let get_definition x =
let k = D.index x in
try D.H.find index k
with Not_found ->
let name = fresh_name D.prefix (D.basename x) in
let item = D.declare x name in
let d = {
Formula.d_name = name ;
Formula.d_section = D.section ;
Formula.d_source = D.location x ;
Formula.d_item = item ;
Formula.d_title = (fun fmt -> D.pp_title fmt x) ;
Formula.d_descr = (fun fmt -> D.pp_descr fmt x) ;
} in
add_declaration d ;
D.H.add index k d ;
List.iter (fun f -> f x d) !demons ;
d