more robust Binding.pretty/print in typical error sitations with spaces etc. (NB: markup can only provide *additional* emphasis and is occasionally suppressed in TTY mode or tooltips);
authorwenzelm
Fri, 15 Jul 2011 13:28:16 +0200
changeset 43839 93f6f24010c2
parent 43838 1c18d52204be
child 43840 04008ec62370
more robust Binding.pretty/print in typical error sitations with spaces etc. (NB: markup can only provide *additional* emphasis and is occasionally suppressed in TTY mode or tooltips);
src/Pure/General/binding.ML
--- a/src/Pure/General/binding.ML	Fri Jul 15 00:49:38 2011 +0200
+++ b/src/Pure/General/binding.ML	Fri Jul 15 13:28:16 2011 +0200
@@ -122,10 +122,9 @@
 (* print *)
 
 fun pretty (Binding {prefix, qualifier, name, pos, ...}) =
-  if name = "" then Pretty.str "\"\""
-  else
-    Pretty.markup (Position.markup pos Markup.binding)
-      [Pretty.str (Long_Name.implode (map #1 (prefix @ qualifier) @ [name]))];
+  Pretty.markup (Position.markup pos Markup.binding)
+    [Pretty.str (Long_Name.implode (map #1 (prefix @ qualifier) @ [name]))]
+  |> Pretty.quote;
 
 val print = Pretty.str_of o pretty;