diff --git a/base/deprecated.jl b/base/deprecated.jl index 19a4707c5d47e..350d27cc437a0 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -999,4 +999,15 @@ macro vectorize_2arg(S,f) end export @vectorize_1arg, @vectorize_2arg +# Deprecate @textmime into the Multimedia module, #18441 +eval(Multimedia, :(macro textmime(mime) + Base.depwarn(string("`@textmime mime` is deprecated; use ", + "`Base.Multimedia.mimetypetype(::MIME{mime}) = ", + "Base.Multimedia.IsText` instead."), :textmime) + quote + Base.Multimedia.mimetypetype(::MIME{$(Meta.quot(Symbol(mime)))}) = + Base.Multimedia.IsText() + end +end)) + # End deprecations scheduled for 0.6 diff --git a/base/multimedia.jl b/base/multimedia.jl index 05ccb25351b5c..8debed28605a4 100644 --- a/base/multimedia.jl +++ b/base/multimedia.jl @@ -92,16 +92,6 @@ stringmime(::IsText, m::MIME, x) = reprmime(m, x) stringmime(::IsBytes, m::MIME, x) = base64encode(verbose_show, m, x) stringmime(::IsBytes, m::MIME, x::Vector{UInt8}) = base64encode(write, x) -macro textmime(mime) - Base.depwarn(string("`@textmime mime` is deprecated; use ", - "`Base.Multimedia.mimetypetype(::MIME{mime}) = ", - "Base.Multimedia.IsText` instead.")) - quote - Base.Multimedia.mimetypetype(::MIME{$(Symbol(mime))}) = - Base.Multimedia.IsText() - end -end - """ istextmime(m::MIME)