src/Pure/Interface/proof_general.ML
changeset 12217 e3efc5c9f267
parent 11888 7099c865de3b
child 12261 ee14db2c571d
equal deleted inserted replaced
12216:dda8c04a8fb4 12217:e3efc5c9f267
    18   val show_context: unit -> theory
    18   val show_context: unit -> theory
    19   val kill_goal: unit -> unit
    19   val kill_goal: unit -> unit
    20   val repeat_undo: int -> unit
    20   val repeat_undo: int -> unit
    21   val isa_restart: unit -> unit
    21   val isa_restart: unit -> unit
    22   val init: bool -> unit
    22   val init: bool -> unit
    23   val write_keywords: unit -> unit
    23   val write_keywords: string -> unit
    24 end;
    24 end;
    25 
    25 
    26 structure ProofGeneral: PROOF_GENERAL =
    26 structure ProofGeneral: PROOF_GENERAL =
    27 struct
    27 struct
    28 
    28 
   306   defconst "major" (map #1 commands) ^
   306   defconst "major" (map #1 commands) ^
   307   defconst "minor" (filter Syntax.is_identifier keywords) ^
   307   defconst "minor" (filter Syntax.is_identifier keywords) ^
   308   implode (map (make_elisp_commands commands) OuterSyntax.Keyword.kinds) ^
   308   implode (map (make_elisp_commands commands) OuterSyntax.Keyword.kinds) ^
   309   "\n(provide 'isar-keywords)\n";
   309   "\n(provide 'isar-keywords)\n";
   310 
   310 
   311 val keywords_file = "isar-keywords.el";
       
   312 
       
   313 in
   311 in
   314 
   312 
   315 fun write_keywords () =
   313 fun write_keywords s =
   316   (init_outer_syntax ();
   314   (init_outer_syntax ();
   317     File.write (Path.unpack keywords_file)
   315     File.write (Path.unpack ("isar-keywords" ^ (if s = "" then "" else "-" ^ s) ^".el"))
   318       (make_elisp_syntax (OuterSyntax.dest_keywords (), OuterSyntax.dest_parsers ())));
   316       (make_elisp_syntax (OuterSyntax.dest_keywords (), OuterSyntax.dest_parsers ())));
   319 
   317 
   320 end;
   318 end;
   321 
   319 
   322 
   320