I'm looking for a function that applies the following behavior to an expression:
-When the expression is given as the full input, or as part of a function that cannot be evaluated, it remains in unevaluated form. -When the expression is used for a function, it is evaluated.
Defer[] won't evaluate it in a function. Unevaluated[] leaves itself in evaluated when used directly as output.
Essentially, I need a function F[] that will output the following:
F[1-1/2]outputs1-1/2, NOT1/2Times[F[1-1/2],5]outputs5/2, NOT(1-1/2)5Times[F[1-1/2],x]outputs(1-1/2)x, NOTx/2
If the solution only works for a specific internal expression, that works, because I only need this for one function.

UpValuesandHoldForm. – Verbeia♦ Jan 10 at 5:06Timesyour actual "specific internal" function? Your third requirement is likely going to require knowledge of that function and special handing. – Mr.Wizard♦ Jan 11 at 5:49