Good afternoon,
This question is based on the question of canceling the evaluation of the complete sequence of inputs .
I think it is possible to achieve the desired behavior by overriding FrontEndEventActionsfor two events: "EvaluateCells"(or by pressing Shift+ Enter) and by pressing Alt+ .. It should be something like:
SetOptions[$FrontEndSession,
FrontEndEventActions -> {"EvaluateCells" :> Last$PreRead,
{{"Alt", "."} :> AbortAllNextInputs}}]
or
SetOptions[$FrontEndSession,
FrontEndEventActions -> {{{"ShiftKey", "ReturnKeyDown"} :> Last$PreRead}
{{"Alt", "."} :> AbortAllNextInputs}}]
Where AbortAllNextInputsand are Last$PreReaddefined as follows:
AbortAllNextInputs := AbortProtect[
$new$PreRead = True;
last$PreRead = ToString[Definition[$PreRead], InputForm];
ClearAll[$PreRead];
$PreRead :=
Last$PreRead :=
$PreRead := AbortProtect[
$new$PreRead = False;
ClearAll[$PreRead];
If[last$PreRead === "Null",
ToExpression[last$PreRead]; $PreRead@
] &
But I can’t work FrontEndEventActions. Can anybody help me?
source
share