(*********************************************************************** This file was generated automatically by the Mathematica front end. It contains Initialization cells from a Notebook file, which typically will have the same name as this file except ending in ".nb" instead of ".m". This file is intended to be loaded into the Mathematica kernel using the package loading commands Get or Needs. Doing so is equivalent to using the Evaluate Initialization Cells menu command in the front end. DO NOT EDIT THIS FILE. This entire file is regenerated automatically each time the parent Notebook file is saved in the Mathematica front end. Any changes you make to this file will be overwritten. ***********************************************************************) BeginPackage["Ersek`MessageControl`"]; SuppressMessage::usage= "SuppressMessage[{mssg1,mssg2, ...},expr] evaluates expr with the \ messages listed suppressed. All messages that SuppressMessage had to turn off \ are automatically turned back on."; TurnOff::usage= "TurnOff[mssg1,mssg2, ...] turns off several messages, and returns a \ result with head TurnedOff to indicate which messages were not already off. \ TurnOff[] affects no messages."; TurnOn::usage= "TurnOn[mssg1,mssg2, ...] turns on several messages, and returns a result \ with head TurnedOn to indicate which messages were not already on. TurnOn[] \ affects no messages."; TurnedOff::usage= "TurnedOff[mssg1,mssg2, ...] is the form of the expression retuned by \ TurnOff."; TurnedOn::usage= "TurnedOn[mssg1,mssg2, ...] is the form of the expression retuned by \ TurnOn."; Begin["`Private`"]; SetAttributes[{SuppressMessage,TurnOn,TurnOff,TurnedOn,TurnedOff},HoldAll]; SuppressMessage[{msgs__MessageName},expr_]:=Module[{posn,y,tmp}, posn=Position[{msgs},_MessageName|_String,{1}]; Off[msgs]; y=expr; On@@Flatten[Hold@@Extract[Hold[msgs],posn,Hold]]; y ] TurnOff[msgs__MessageName]:= With[{posn=Position[{msgs},_MessageName|_String,{1}]}, Off[msgs]; Flatten[TurnedOff@@Extract[TurnedOff[msgs],posn,TurnedOff]] ] TurnOff[]=TurnedOff[]; TurnOn[msgs__MessageName ]:= With[{posn=Position[{msgs},_$Off,{1}]}, On[msgs]; Flatten[TurnedOn@@Extract[TurnedOn[msgs],posn,TurnedOn]] ] TurnOn[]=TurnedOn[]; End[]; EndPackage[];