File 2929-stdlib-Delete-dead-edlin-code.patch of Package erlang
From 9fff925758f86c2c35590e5de55f3faf5182f74e Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 4 Feb 2022 09:33:13 +0100
Subject: [PATCH 09/34] stdlib: Delete dead edlin code
---
lib/stdlib/src/edlin.erl | 145 ---------------------------------------
1 file changed, 145 deletions(-)
diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl
index cbd10ae3bd..97088dd361 100644
--- a/lib/stdlib/src/edlin.erl
+++ b/lib/stdlib/src/edlin.erl
@@ -621,148 +621,3 @@ cp_len(Str) ->
cp_len([GC|R], Len) ->
cp_len(R, Len + gc_len(GC));
cp_len([], Len) -> Len.
-
-%% %% expand(CurrentBefore) ->
-%% %% {yes,Expansion} | no
-%% %% Try to expand the word before as either a module name or a function
-%% %% name. We can handle white space around the seperating ':' but the
-%% %% function name must be on the same line. CurrentBefore is reversed
-%% %% and over_word/3 reverses the characters it finds. In certain cases
-%% %% possible expansions are printed.
-
-%% expand(Bef0) ->
-%% {Bef1,Word,_} = over_word(Bef0, [], 0),
-%% case over_white(Bef1, [], 0) of
-%% {[$:|Bef2],_White,_Nwh} ->
-%% {Bef3,_White1,_Nwh1} = over_white(Bef2, [], 0),
-%% {_,Mod,_Nm} = over_word(Bef3, [], 0),
-%% expand_function_name(Mod, Word);
-%% {_,_,_} ->
-%% expand_module_name(Word)
-%% end.
-
-%% expand_module_name(Prefix) ->
-%% match(Prefix, code:all_loaded(), ":").
-
-%% expand_function_name(ModStr, FuncPrefix) ->
-%% Mod = list_to_atom(ModStr),
-%% case erlang:module_loaded(Mod) of
-%% true ->
-%% L = apply(Mod, module_info, []),
-%% case lists:keyfind(exports, 1, L) of
-%% {_, Exports} ->
-%% match(FuncPrefix, Exports, "(");
-%% _ ->
-%% no
-%% end;
-%% false ->
-%% no
-%% end.
-
-%% match(Prefix, Alts, Extra) ->
-%% Matches = match1(Prefix, Alts),
-%% case longest_common_head([N || {N,_} <- Matches]) of
-%% {partial, []} ->
-%% print_matches(Matches),
-%% no;
-%% {partial, Str} ->
-%% case lists:nthtail(length(Prefix), Str) of
-%% [] ->
-%% print_matches(Matches),
-%% {yes, []};
-%% Remain ->
-%% {yes, Remain}
-%% end;
-%% {complete, Str} ->
-%% {yes, lists:nthtail(length(Prefix), Str) ++ Extra};
-%% no ->
-%% no
-%% end.
-
-%% %% Print the list of names L in multiple columns.
-%% print_matches(L) ->
-%% io:nl(),
-%% col_print(lists:sort(L)),
-%% ok.
-
-%% col_print([]) -> ok;
-%% col_print(L) -> col_print(L, field_width(L), 0).
-
-%% col_print(X, Width, Len) when Width + Len > 79 ->
-%% io:nl(),
-%% col_print(X, Width, 0);
-%% col_print([{H0,A}|T], Width, Len) ->
-%% H = if
-%% %% If the second element is an integer, we assume it's an
-%% %% arity, and meant to be printed.
-%% integer(A) ->
-%% H0 ++ "/" ++ integer_to_list(A);
-%% true ->
-%% H0
-%% end,
-%% io:format("~-*s",[Width,H]),
-%% col_print(T, Width, Len+Width);
-%% col_print([], _, _) ->
-%% io:nl().
-
-%% field_width([{H,_}|T]) -> field_width(T, length(H)).
-
-%% field_width([{H,_}|T], W) ->
-%% case length(H) of
-%% L when L > W -> field_width(T, L);
-%% _ -> field_width(T, W)
-%% end;
-%% field_width([], W) when W < 40 ->
-%% W + 4;
-%% field_width([], _) ->
-%% 40.
-
-%% match1(Prefix, Alts) ->
-%% match1(Prefix, Alts, []).
-
-%% match1(Prefix, [{H,A}|T], L) ->
-%% case prefix(Prefix, Str = atom_to_list(H)) of
-%% true ->
-%% match1(Prefix, T, [{Str,A}|L]);
-%% false ->
-%% match1(Prefix, T, L)
-%% end;
-%% match1(_, [], L) ->
-%% L.
-
-%% longest_common_head([]) ->
-%% no;
-%% longest_common_head(LL) ->
-%% longest_common_head(LL, []).
-
-%% longest_common_head([[]|_], L) ->
-%% {partial, reverse(L)};
-%% longest_common_head(LL, L) ->
-%% case same_head(LL) of
-%% true ->
-%% [[H|_]|_] = LL,
-%% LL1 = all_tails(LL),
-%% case all_nil(LL1) of
-%% false ->
-%% longest_common_head(LL1, [H|L]);
-%% true ->
-%% {complete, reverse([H|L])}
-%% end;
-%% false ->
-%% {partial, reverse(L)}
-%% end.
-
-%% same_head([[H|_]|T1]) -> same_head(H, T1).
-
-%% same_head(H, [[H|_]|T]) -> same_head(H, T);
-%% same_head(_, []) -> true;
-%% same_head(_, _) -> false.
-
-%% all_tails(LL) -> all_tails(LL, []).
-
-%% all_tails([[_|T]|T1], L) -> all_tails(T1, [T|L]);
-%% all_tails([], L) -> L.
-
-%% all_nil([]) -> true;
-%% all_nil([[] | Rest]) -> all_nil(Rest);
-%% all_nil(_) -> false.
--
2.35.3