no completion of concealed names;
authorwenzelm
Fri, 07 Mar 2014 11:48:11 +0100
changeset 55975 9962ca0875c9
parent 55974 c835a9379026
child 55976 43815ee659bc
no completion of concealed names;
src/Pure/General/name_space.ML
--- a/src/Pure/General/name_space.ML	Fri Mar 07 11:46:26 2014 +0100
+++ b/src/Pure/General/name_space.ML	Fri Mar 07 11:48:11 2014 +0100
@@ -208,11 +208,13 @@
   if Position.is_reported pos then
     let
       val x = Name.clean xname;
-      val Name_Space {kind = k, internals, ...} = space;
+      val Name_Space {kind, internals, ...} = space;
       val ext = extern_shortest (Context.proof_of context) space;
       val names =
         Symtab.fold
-          (fn (a, (b :: _, _)) => String.isPrefix x a ? cons (ext b, Long_Name.implode [k, b])
+          (fn (a, (name :: _, _)) =>
+              if String.isPrefix x a andalso not (is_concealed space name)
+              then cons (ext name, Long_Name.implode [kind, name]) else I
             | _ => I) internals []
         |> sort_distinct (string_ord o pairself #1);
     in Completion.names pos names end