In places where a function holds its arguments you can force evaluation by wrapping Evaluate. So for instance Hold[Evaluate[1+2]] will give you 3. The reson the right hand side is not evaluated is because SetDelayed has HoldAll:
Attributes[SetDelayed]
{HoldAll, Protected, SequenceHold}
but you can simply force evaluation in the same manor:
a = x^2
f[x_] := Evaluate[a]
f[k]
k^2
Depending on how much of your expression you want to evaluate this may work, but there may be cases where you need more control over the evaluation leaving some terms unevaluated until the actual function application of f. If this is the case and this doesn't work for you please extend your question.
As added by Szabolcs. Using Set rather then SetDelayed will also clear this up, since it doesn't hold its right hand side, only the left hand side (the first argument) arguments:
Attributes[Set]
{HoldFirst, Protected, SequenceHold}
And here is a nice documentation reference again provided by Szabolcs: http://reference.wolfram.com/mathematica/tutorial/ImmediateAndDelayedDefinitions.html
a = xand then trying to wrestle with it, why not simply writef[x_] := xor if you need to evaluate the rhs,f[x_] := Evaluate@foo? Further still, if you need to simultaneously assign it toafor whatever purpose,f[x_] := a = x? Is there some reason you're doing it in a roundabout way? $\endgroup$f[x_] = ainstead off[x_] := a? $\endgroup$a, from where I misused one of my own functions. $\endgroup$