Skip to content

Commit 97c11fe

Browse files
author
Dave Moon
committed
Use quote instead of Expr in help macro so it gets automatic hygiene the same as before my changes
1 parent ac7240b commit 97c11fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/help.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ isname(ex::Expr) = ((ex.head == :. && isname(ex.args[1]) && isname(ex.args[2]))
186186

187187
macro help(ex)
188188
if ex === :? || ex === :help
189-
return Expr(:call, :help)
189+
return :(help())
190190
elseif !isa(ex, Expr) || isname(ex)
191-
return Expr(:call, :help, esc(ex))
191+
return :(help($ex))
192192
elseif ex.head == :macrocall && length(ex.args) == 1
193193
# e.g., "julia> @help @printf"
194-
return Expr(:call, :help, string(ex.args[1]))
194+
return :(help($(string(ex.args[1]))))
195195
else
196-
return Expr(:macrocall, symbol("@which"), esc(ex))
196+
return :(@which $ex)
197197
end
198198
end
199199

0 commit comments

Comments
 (0)