Skip to content

Commit

Permalink
Move deprecation to deprecated.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
TotalVerb committed Sep 14, 2016
1 parent 4e02360 commit 4524d8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 11 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 0 additions & 10 deletions base/multimedia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4524d8e

Please sign in to comment.