diff --git a/base/deprecated.jl b/base/deprecated.jl index 942f7bcbb179a..e0dec70da1f29 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -1002,3 +1002,6 @@ export call # 1933 @deprecate_binding SingleAsyncWork AsyncCondition + +# #12872 +@deprecate istext istextmime diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index f39911c9cc658..f94fe45fdfd8e 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -8182,7 +8182,7 @@ Returns an `AbstractString` or `Vector{UInt8}` containing the representation of requested `mime` type, as written by `writemime` (throwing a `MethodError` if no appropriate `writemime` is available). An `AbstractString` is returned for MIME types with textual representations (such as `"text/html"` or `"application/postscript"`), whereas binary data -is returned as `Vector{UInt8}`. (The function `istext(mime)` returns whether or not Julia +is returned as `Vector{UInt8}`. (The function `istextmime(mime)` returns whether or not Julia treats a given `mime` type as text.) As a special case, if `x` is an `AbstractString` (for textual MIME types) or a @@ -10160,11 +10160,11 @@ processes completed successfully. exit """ - istext(m::MIME) + istextmime(m::MIME) Determine whether a MIME type is text data. """ -istext +istextmime """ merge!(collection, others...) diff --git a/base/exports.jl b/base/exports.jl index 4f0601ca50fae..a761f2314a5b3 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -1239,7 +1239,7 @@ export display, displayable, TextDisplay, - istext, + istextmime, MIME, @MIME, @MIME_str, diff --git a/base/multimedia.jl b/base/multimedia.jl index be8c6f372c697..7a69c1ffbdf2e 100644 --- a/base/multimedia.jl +++ b/base/multimedia.jl @@ -3,7 +3,7 @@ module Multimedia export Display, display, pushdisplay, popdisplay, displayable, redisplay, - MIME, @MIME, @MIME_str, writemime, reprmime, stringmime, istext, + MIME, @MIME, @MIME_str, writemime, reprmime, stringmime, istextmime, mimewritable, TextDisplay ########################################################################### @@ -45,7 +45,7 @@ mimewritable(m::AbstractString, x) = mimewritable(MIME(m), x) ########################################################################### # MIME types are assumed to be binary data except for a set of types known -# to be text data (possibly Unicode). istext(m) returns whether +# to be text data (possibly Unicode). istextmime(m) returns whether # m::MIME is text data, and reprmime(m, x) returns x written to either # a string (for text m::MIME) or a Vector{UInt8} (for binary m::MIME), # assuming the corresponding write_mime method exists. stringmime @@ -65,7 +65,7 @@ macro textmime(mime) Base.Multimedia.reprmime(m::mimeT, x::Vector{UInt8}) = sprint(writemime, m, x) Base.Multimedia.stringmime(m::mimeT, x::Vector{UInt8}) = reprmime(m, x) - Base.Multimedia.istext(::mimeT) = true + Base.Multimedia.istextmime(::mimeT) = true if $(mime != "text/plain") # strings are shown escaped for text/plain Base.Multimedia.reprmime(m::mimeT, x::AbstractString) = x end @@ -74,7 +74,7 @@ macro textmime(mime) end end -istext(::MIME) = false +istextmime(::MIME) = false function reprmime(m::MIME, x) s = IOBuffer() writemime(s, m, x) @@ -85,7 +85,7 @@ stringmime(m::MIME, x) = base64encode(writemime, m, x) stringmime(m::MIME, x::Vector{UInt8}) = base64encode(write, x) # it is convenient to accept strings instead of ::MIME -istext(m::AbstractString) = istext(MIME(m)) +istextmime(m::AbstractString) = istextmime(MIME(m)) reprmime(m::AbstractString, x) = reprmime(MIME(m), x) stringmime(m::AbstractString, x) = stringmime(MIME(m), x)