Is there a way to temporarily suppress certain messages, so that I could write for example (with made-up syntax for that feature):
WithOff[Pattern::patv, rule = (f[x_Integer|{x__Integer}] :> g[x])];
rule2 = x_[x__] :> x;
and get no Pattern::patv
message for rule
, but do get one for rule2
iff the message was enabled at the beginning (that is, WithOff
doesn't affect the on/off status of the message outside of its argument)?
Quiet[]
?Quiet[rule = (f[x_Integer | {x__Integer}] :> g[x]), Pattern::patv]
$\endgroup$