allow suffix of underscores (usually unused names), to extend completion beyond already recognized entry;
authorwenzelm
Sun, 02 Mar 2014 22:03:27 +0100
changeset 55845 a05413276a0d
parent 55844 fc04c24ad9ee
child 55846 b56fda32bf24
allow suffix of underscores (usually unused names), to extend completion beyond already recognized entry;
src/Pure/General/name_space.ML
--- a/src/Pure/General/name_space.ML	Sun Mar 02 21:52:44 2014 +0100
+++ b/src/Pure/General/name_space.ML	Sun Mar 02 22:03:27 2014 +0100
@@ -206,11 +206,12 @@
   if Context_Position.is_visible_generic context andalso Position.is_reported pos
   then
     let
+      val x = Name.clean xname;
       val Name_Space {kind = k, internals, ...} = space;
       val ext = extern_shortest (Context.proof_of context) space;
       val names =
         Symtab.fold
-          (fn (a, (b :: _, _)) => String.isPrefix xname a ? cons (ext b, Long_Name.implode [k, b])
+          (fn (a, (b :: _, _)) => String.isPrefix x a ? cons (ext b, Long_Name.implode [k, b])
             | _ => I) internals []
         |> sort_distinct (string_ord o pairself #1);
     in Completion.names pos names end