def completion_code(code, lineno, column=nil)
elisp = "(progn\n"
table = "(setq rct-method-completion-table '("
help_alist = "(setq alist '("
begin
klass, cands = candidates_with_class(code, lineno, column)
cands.sort.each do |minfo|
meth, description = split_method_info(minfo)
table << format('("%s\t[%s]") ', meth, description)
help_alist << format('("%s" . "%s")', meth, description)
end
table << "))\n"
help_alist << "))\n"
rescue Exception => err
return error_code(err)
end
elisp << table << help_alist
elisp << %Q[(setq pattern "#{prefix}")\n]
elisp << %Q[(setq klass "#{klass}")\n]
elisp << ")"
end