allow suffix of underscores (usually unused names), to extend completion beyond already recognized entry;
--- 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