redefining macro as a function?



[C Y , Thu, 9 Jun 2005 11:26:52 -0700 (PDT)]:
> preread - preeval - posteval

Just one data point: In Mathematica they had to introduce four
variables, $PreRead, $Pre, $PrePrint, $Post.

The canonical example of their use is automatically wrapping Time[]
around each call, Print[]-ing the second element of the returned list
(which is the time evaluation took), and returning the first one only
(which is the result of the evaluation).  That way displaying the time
is transparent and works irrespective of the frontend.

Albert.