Changes: - Use \path instead of \ATcode to save the catcode of @. Expand \pathafterhook after \path's work is done.