Skip to content

Commit 3b15023

Browse files
author
Pawel 'kTT' Salata
committed
Using module_info/1 in erlang_completion
1 parent ac9b2cf commit 3b15023

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

autoload/erlang_completion.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
main([ModuleName]) ->
55
Module = erlang:list_to_atom(ModuleName),
6-
try Module:module_info() of
7-
ModuleInfo ->
8-
{exports, Functions} = lists:keyfind(exports, 1, ModuleInfo),
6+
try Module:module_info(exports) of
7+
Functions ->
98
lists:foreach(
109
fun({FunctionName, ArgumentsCount}) ->
1110
io:format("~s/~B~n", [FunctionName, ArgumentsCount])

0 commit comments

Comments
 (0)