Skip to content

Commit 18f0153

Browse files
committed
Move deprecation to deprecated.jl
1 parent 66dab93 commit 18f0153

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

base/deprecated.jl

+11
Original file line numberDiff line numberDiff line change
@@ -995,4 +995,15 @@ macro vectorize_2arg(S,f)
995995
end
996996
export @vectorize_1arg, @vectorize_2arg
997997

998+
# Deprecate @textmime into the Multimedia module, #18441
999+
eval(Multimedia, :(macro textmime(mime)
1000+
Base.depwarn(string("`@textmime mime` is deprecated; use ",
1001+
"`Base.Multimedia.mimetypetype(::MIME{mime}) = ",
1002+
"Base.Multimedia.IsText` instead."), :textmime)
1003+
quote
1004+
Base.Multimedia.mimetypetype(::MIME{$(Meta.quot(Symbol(mime)))}) =
1005+
Base.Multimedia.IsText()
1006+
end
1007+
end))
1008+
9981009
# End deprecations scheduled for 0.6

base/multimedia.jl

-10
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ stringmime(::IsText, m::MIME, x) = reprmime(m, x)
9292
stringmime(::IsBytes, m::MIME, x) = base64encode(verbose_show, m, x)
9393
stringmime(::IsBytes, m::MIME, x::Vector{UInt8}) = base64encode(write, x)
9494

95-
macro textmime(mime)
96-
Base.depwarn(string("`@textmime mime` is deprecated; use ",
97-
"`Base.Multimedia.mimetypetype(::MIME{mime}) = ",
98-
"Base.Multimedia.IsText` instead."))
99-
quote
100-
Base.Multimedia.mimetypetype(::MIME{$(Symbol(mime))}) =
101-
Base.Multimedia.IsText()
102-
end
103-
end
104-
10595
"""
10696
istextmime(m::MIME)
10797

0 commit comments

Comments
 (0)