# HG changeset patch # User haftmann # Date 1253035007 -7200 # Node ID 986cba8c5053007ed20285af5c929ac21eff2f51 # Parent bf6c78d9f94c2e09203532090ba7d7b80617626d# Parent a382876d3290519aac943bb3482ed43d8421f55c merged diff -r a382876d3290 -r 986cba8c5053 src/Pure/General/position.ML --- a/src/Pure/General/position.ML Tue Sep 15 19:16:35 2009 +0200 +++ b/src/Pure/General/position.ML Tue Sep 15 19:16:47 2009 +0200 @@ -21,6 +21,7 @@ val line: int -> T val line_file: int -> string -> T val id: string -> T + val id_only: string -> T val get_id: T -> string option val put_id: string -> T -> T val of_properties: Properties.T -> T @@ -97,8 +98,8 @@ fun line_file i name = Pos ((i, 0, 0), file_name name); fun line i = line_file i ""; - fun id id = Pos ((0, 0, 1), [(Markup.idN, id)]); +fun id_only id = Pos ((0, 0, 0), [(Markup.idN, id)]); fun get_id (Pos (_, props)) = Properties.get props Markup.idN; fun put_id id (Pos (count, props)) = Pos (count, Properties.put (Markup.idN, id) props); diff -r a382876d3290 -r 986cba8c5053 src/Pure/Isar/isar_document.ML --- a/src/Pure/Isar/isar_document.ML Tue Sep 15 19:16:35 2009 +0200 +++ b/src/Pure/Isar/isar_document.ML Tue Sep 15 19:16:47 2009 +0200 @@ -278,6 +278,7 @@ val _ = OuterSyntax.internal_command "Isar.define_command" (P.string -- P.string >> (fn (id, text) => + Toplevel.position (Position.id_only id) o Toplevel.imperative (fn () => define_command id (OuterSyntax.prepare_command (Position.id id) text))));