summaryrefslogtreecommitdiffstats
path: root/struct.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-02-19 10:50:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-02-19 10:50:10 -0800
commitc914063fd0eb8c02d8362b86a61933c656a938bc (patch)
treea81db16032450b5ece94b70c2d824e6bd2c79571 /struct.h
parentf20db9ab6cacd73f4276c6541d3009e731811a7e (diff)
downloadtxr-c914063fd0eb8c02d8362b86a61933c656a938bc.tar.gz
txr-c914063fd0eb8c02d8362b86a61933c656a938bc.tar.bz2
txr-c914063fd0eb8c02d8362b86a61933c656a938bc.zip
listener: restore and improve method completion.
The recent autoload changes have degraded method completion, which didn't work well in the first place. Test case: with this change you can type term.(go[Tab] to complete to term.(go-raw or term.(go-cbreak. * parser.c (find_matching_syms): Do not use the get_slot_syms function for finding method and slot symbols. Just use get_visible_syms, like for other bindings. Instead, in the switch statement in the loop, for the 'M' (method) and 'S' (slot) completion types, we use the static_slot_types and slot_types functions to inquire whether a symbol has a binding. And these two functions do something important: unlike get_slot_syms, they trigger autoload. * struct.c (get_slot_syms): Function removed. * struct.h (get_slot_syms): Declaration removed.
Diffstat (limited to 'struct.h')
-rw-r--r--struct.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/struct.h b/struct.h
index 0fd3c067..87587f8f 100644
--- a/struct.h
+++ b/struct.h
@@ -86,7 +86,6 @@ val super_method(val strct, val slotsym);
val uslot(val slot);
val umethod(val slot, struct args *);
val method_name(val fun);
-val get_slot_syms(val package, val is_current, val method_only);
val slot_types(val slot);
val static_slot_types(val slot);
val slot_type_reg(val slot, val strct);