# Calling a macro from within a macro, revisited

**URL:** <https://discourse.julialang.org/t/calling-a-macro-from-within-a-macro-revisited/19680>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 15, 2019, 10:27pm UTC](https://discourse.julialang.org/t/calling-a-macro-from-within-a-macro-revisited/19680 "2019-01-15T22:27:01Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [January 16, 2019, 12:21am UTC](https://discourse.julialang.org/t/calling-a-macro-from-within-a-macro-revisited/19680/12 "2019-01-16T00:21:30Z")

</div>

> [@tjgreen](#):
>
> Can you think of a generic implementation that doesn’t make any assumptions about the shape of the underlying macro’s arguments?

Yes,

```Julia
macro retestset1(arg)
    :(@testset$(Expr(arg.head,esc.(arg.args)...))
end

```

simply replace `:block` with `arg.head`

---

_[View the full topic](https://discourse.julialang.org/t/calling-a-macro-from-within-a-macro-revisited/19680)._
