What are the rules for dereferencing macros such as e(depvar), and macros which are themselves already macros such as `macro' ?

Code:
. sysuse auto, clear
(1978 Automobile Data)

. qui sureg (price length) (mpg head weight)

. dis "`e(depvar)'"
price mpg
So far so good, the macro e(depvar) contains what I am interested in, and I want to create tempvars with those names:

Code:
. tempvar "`e(depvar)'"
_"price mpg invalid name
r(198);
So how do I dereference this e(depvar) so that I can use it in the tempvar command?

Next, lets assume that I have succeeded, I will do it manually below, but I want this to be automated as above:

Code:
. tempvar price mpg

. 
. foreach l of local e(depvar) {
  2. 
. predict ``l'', resid eq(`l')
  3. 
. }
{ required
r(100);

end of do-file

r(100);
and this fails even before I can reach my second question. What I am trying to do above is to cycle through the elements of e(depvar), and then to generate new variable with the tempvar name.

E.g., manually this would be (but I do not want it manual, I want it automatic):

Code:
. qui sureg (price length) (mpg head weight)

. 
. tempvar price mpg

. 
. foreach l in price mpg {
  2. 
. predict ``l'', resid eq(`l')
  3. 
. }

. 
. summ `price'

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    __000000 |         74   -3.66e-06    2660.321   -3276.24   8826.866

. 
. summ `mpg'

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    __000001 |         74    8.81e-09    3.411963  -6.985186   13.98194

. 
end of do-file

.