@@ -214,7 +214,9 @@ show(io::IO, m::Method; kwargs...) = show_method(IOContext(io, :compact=>true),
214214
215215show (io:: IO , :: MIME"text/plain" , m:: Method ; kwargs... ) = show_method (io, m; kwargs... )
216216
217- function show_method (io:: IO , m:: Method ; modulecolor = :light_black , digit_align_width = 1 )
217+ function show_method (io:: IO , m:: Method ;
218+ modulecolor = :light_black , digit_align_width = 1 ,
219+ print_signature_only:: Bool = get (io, :print_method_signature_only , false ):: Bool )
218220 tv, decls, file, line = arg_decl_parts (m)
219221 sig = unwrap_unionall (m. sig)
220222 if sig === Tuple
@@ -250,12 +252,14 @@ function show_method(io::IO, m::Method; modulecolor = :light_black, digit_align_
250252 show_method_params (io, tv)
251253 end
252254
253- if ! (get (io, :compact , false ):: Bool ) # single-line mode
254- println (io)
255- digit_align_width += 4
255+ if ! print_signature_only
256+ if ! (get (io, :compact , false ):: Bool ) # single-line mode
257+ println (io)
258+ digit_align_width += 4
259+ end
260+ # module & file, re-using function from errorshow.jl
261+ print_module_path_file (io, parentmodule (m), string (file), line; modulecolor, digit_align_width)
256262 end
257- # module & file, re-using function from errorshow.jl
258- print_module_path_file (io, parentmodule (m), string (file), line; modulecolor, digit_align_width)
259263end
260264
261265function show_method_list_header (io:: IO , ms:: MethodList , namefmt:: Function )
0 commit comments