Using `With[...]` with a list specification as a variable
One of the standard tricks I learn on this site is this:
init = Hold[{a = 1, b = 2, c = 3}];
init /. Hold[v_] :> With[v, f[a, b, c, x]]
(* f[1, 2, 3, x] *)
Another way is to use delayed assignment in the first argument of With
:
With[{init := {a = 1, b = 2}},
With[init, {a, b}]]
{1, 2}
Or if you prefer to store your variable specification list as an OwnValue
:
init := {a = 1, b = 2}
Unevaluated[With[init, {a, b}]] /. OwnValues[init]
{1, 2}