src/Pure/ProofGeneral/proof_general_emacs.ML
changeset 28106 48b9c8756020
parent 28103 b79e61861f0f
child 28375 c879d88d038a
equal deleted inserted replaced
28105:44054657ea56 28106:48b9c8756020
   174   emacs_notify ("Proof General, theorem dependencies of " ^ thms ^ " are " ^ deps);
   174   emacs_notify ("Proof General, theorem dependencies of " ^ thms ^ " are " ^ deps);
   175 
   175 
   176 in
   176 in
   177 
   177 
   178 fun setup_present_hook () = Toplevel.add_hook (fn _ => fn state => fn state' =>
   178 fun setup_present_hook () = Toplevel.add_hook (fn _ => fn state => fn state' =>
   179   if print_mode_active thm_depsN andalso Toplevel.is_theory state' then
   179   if print_mode_active thm_depsN andalso
       
   180     can Toplevel.theory_of state andalso Toplevel.is_theory state'
       
   181   then
   180     let val (names, deps) =
   182     let val (names, deps) =
   181       ProofGeneralPgip.new_thms_deps (Toplevel.theory_of state) (Toplevel.theory_of state')
   183       ProofGeneralPgip.new_thms_deps (Toplevel.theory_of state) (Toplevel.theory_of state')
   182     in
   184     in
   183       if null names orelse null deps then ()
   185       if null names orelse null deps then ()
   184       else thm_deps_message (spaces_quote names, spaces_quote deps)
   186       else thm_deps_message (spaces_quote names, spaces_quote deps)