@@ -186,8 +186,8 @@ defmodule IO.ANSI do
186186 [[[[[[], "Hello, "] | "\e[31m"] | "\e[1m"], "world!"] | "\e[0m"]
187187
188188 """
189- def format ( chardata , emit \\ enabled? ) when is_boolean ( emit ) do
190- do_format ( chardata , [ ] , [ ] , emit , :maybe )
189+ def format ( chardata , emit? \\ enabled? ) when is_boolean ( emit? ) do
190+ do_format ( chardata , [ ] , [ ] , emit? , :maybe )
191191 end
192192
193193 @ doc ~S"""
@@ -206,12 +206,12 @@ defmodule IO.ANSI do
206206 [[[[[[] | "\e[1m"], 87], 111], 114], 100]
207207
208208 """
209- def format_fragment ( chardata , emit \\ enabled? ) when is_boolean ( emit ) do
210- do_format ( chardata , [ ] , [ ] , emit , false )
209+ def format_fragment ( chardata , emit? \\ enabled? ) when is_boolean ( emit? ) do
210+ do_format ( chardata , [ ] , [ ] , emit? , false )
211211 end
212212
213- defp do_format ( [ term | rest ] , rem , acc , emit , append_reset ) do
214- do_format ( term , [ rest | rem ] , acc , emit , append_reset )
213+ defp do_format ( [ term | rest ] , rem , acc , emit? , append_reset ) do
214+ do_format ( term , [ rest | rem ] , acc , emit? , append_reset )
215215 end
216216
217217 defp do_format ( term , rem , acc , true , append_reset ) when is_atom ( term ) do
@@ -222,19 +222,19 @@ defmodule IO.ANSI do
222222 do_format ( [ ] , rem , acc , false , append_reset )
223223 end
224224
225- defp do_format ( term , rem , acc , emit , append_reset ) when not is_list ( term ) do
226- do_format ( [ ] , rem , [ acc | [ term ] ] , emit , append_reset )
225+ defp do_format ( term , rem , acc , emit? , append_reset ) when not is_list ( term ) do
226+ do_format ( [ ] , rem , [ acc , term ] , emit? , append_reset )
227227 end
228228
229- defp do_format ( [ ] , [ next | rest ] , acc , emit , append_reset ) do
230- do_format ( next , rest , acc , emit , append_reset )
229+ defp do_format ( [ ] , [ next | rest ] , acc , emit? , append_reset ) do
230+ do_format ( next , rest , acc , emit? , append_reset )
231231 end
232232
233233 defp do_format ( [ ] , [ ] , acc , true , true ) do
234234 [ acc | IO.ANSI . reset ]
235235 end
236236
237- defp do_format ( [ ] , [ ] , acc , _emit , _append_reset ) do
237+ defp do_format ( [ ] , [ ] , acc , _emit? , _append_reset ) do
238238 acc
239239 end
240240end
0 commit comments