Skip to content

Invocation() of a macro created via \let references original macro #849

@tkw1536

Description

@tkw1536

Assume we are defining a macro then copy it via a \let into a second macro with something like

\def\dummymacro{}
\let\othermacro\dummymacro

If we now want to now have tokens representing the invocation of this macro, we should then be able to use

Invocation('\othermacro');

which we would expect to return a single T_CS('\othermacro'). When running this code however, we get T_CS('\dummymacro') instead.

This comes from a more complicated scenario I encountered while updating keyval bindings, but I have gotten it down to this very basic example. This caused an infinite loop, making debugging very hard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions