How to interpolate in nested quotes?

Suppose that I have a variable v and I want to interpolate it into a nested quote expression. I tried double interpolation but it does not work properly…

This is what I want:

julia> :( :( x = 1 ) ) |> dump
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol =
      args: Array{Any}((2,))
        1: Symbol x
        2: Int64 1

And, this is what I got:

julia> v = 1;

julia> :( :( x = $$v ) ) |> dump
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol =
      args: Array{Any}((2,))
        1: Symbol x
        2: Expr
          head: Symbol $
          args: Array{Any}((1,))
            1: Int64 1

Would this work in your real use case?

julia> v = 1;
julia> Meta.quot(:(x=$v)) |> dump
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol =
      args: Array{Any}((2,))
        1: Symbol x
        2: Int64 1

Thanks. I don’t really have a use case yet but as I’m learning how it works it doesn’t seem intuitive.