clarified YXML.embed_controls -- this is idempotent and cannot be nested;
authorwenzelm
Tue, 12 Jul 2011 13:45:05 +0200
changeset 43772 c825594fd0c1
parent 43771 fc524449f511
child 43773 e8ba493027a3
clarified YXML.embed_controls -- this is idempotent and cannot be nested;
src/Pure/General/yxml.ML
src/Pure/System/isabelle_process.ML
--- a/src/Pure/General/yxml.ML	Tue Jul 12 13:39:29 2011 +0200
+++ b/src/Pure/General/yxml.ML	Tue Jul 12 13:45:05 2011 +0200
@@ -15,7 +15,7 @@
 
 signature YXML =
 sig
-  val escape_controls: string -> string
+  val embed_controls: string -> string
   val detect: string -> bool
   val output_markup: Markup.T -> string * string
   val element: string -> XML.attributes -> string list -> string
@@ -37,7 +37,7 @@
   then chr 192 ^ chr (128 + ord c)
   else c;
 
-fun escape_controls str =
+fun embed_controls str =
   if exists_string Symbol.is_ascii_control str
   then translate_string pseudo_utf8 str
   else str;
--- a/src/Pure/System/isabelle_process.ML	Tue Jul 12 13:39:29 2011 +0200
+++ b/src/Pure/System/isabelle_process.ML	Tue Jul 12 13:45:05 2011 +0200
@@ -68,7 +68,7 @@
 
 fun message mbox ch raw_props body =
   let
-    val robust_props = map (pairself YXML.escape_controls) raw_props;
+    val robust_props = map (pairself YXML.embed_controls) raw_props;
     val header = YXML.string_of (XML.Elem ((ch, robust_props), []));
   in Mailbox.send mbox (chunk header @ chunk body) end;