tuned signature;
authorwenzelm
Mon, 23 Dec 2024 14:09:43 +0100
changeset 81647 ae670d860912
parent 81646 4c51d3341de8
child 81648 c98cfdcb2df0
tuned signature;
src/Pure/General/completion.scala
src/Pure/General/word.scala
src/Pure/PIDE/markup.scala
src/Pure/PIDE/rendering.scala
--- a/src/Pure/General/completion.scala	Sun Dec 22 14:21:39 2024 +0100
+++ b/src/Pure/General/completion.scala	Mon Dec 23 14:09:43 2024 +0100
@@ -198,8 +198,7 @@
             if (kind == "") (name, quote(decode(name)))
             else
              (Long_Name.qualify(kind, name),
-              Word.implode(Word.explode('_', kind)) +
-              (if (xname == name) "" else " " + quote(decode(name))))
+              Word.informal(kind) + (if (xname == name) "" else " " + quote(decode(name))))
         } yield {
           val description = List(xname1, "(" + descr_name + ")")
           val replacement =
--- a/src/Pure/General/word.scala	Sun Dec 22 14:21:39 2024 +0100
+++ b/src/Pure/General/word.scala	Mon Dec 23 14:09:43 2024 +0100
@@ -76,6 +76,8 @@
   def explode(text: String): List[String] =
     explode(Character.isWhitespace _, text)
 
+  def informal(text: String): String = implode(explode('_', text))
+
 
   /* brackets */
 
--- a/src/Pure/PIDE/markup.scala	Sun Dec 22 14:21:39 2024 +0100
+++ b/src/Pure/PIDE/markup.scala	Mon Dec 23 14:09:43 2024 +0100
@@ -238,7 +238,7 @@
     def is_antiquotation: Boolean = name == Language.ANTIQUOTATION
     def is_path: Boolean = name == Language.PATH
 
-    def description: String = Word.implode(Word.explode('_', name))
+    def description: String = Word.informal(name)
   }
 
 
--- a/src/Pure/PIDE/rendering.scala	Sun Dec 22 14:21:39 2024 +0100
+++ b/src/Pure/PIDE/rendering.scala	Mon Dec 23 14:09:43 2024 +0100
@@ -175,7 +175,7 @@
   def tooltip_text(markup: String, kind: String, name: String): String = {
     val a = kind.nonEmpty
     val b = name.nonEmpty
-    val k = Word.implode(Word.explode('_', kind))
+    val k = Word.informal(kind)
     if (!a && !b) markup
     else markup + ": " + k + if_proper(a && b, " ") + if_proper(b, quote(name))
   }
@@ -678,7 +678,7 @@
 
           case (info, Text.Info(r0, XML.Elem(Markup.Entity(kind, name), _)))
           if kind != "" && kind != Markup.ML_DEF =>
-            val kind1 = Word.implode(Word.explode('_', kind))
+            val kind1 = Word.informal(kind)
             val txt1 =
               if (name == "") kind1
               else if (kind1 == "") quote(name)