Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion entries for redefined commands #3925

Closed
muzimuzhi opened this issue Dec 26, 2024 · 1 comment
Closed

Completion entries for redefined commands #3925

muzimuzhi opened this issue Dec 26, 2024 · 1 comment

Comments

@muzimuzhi
Copy link
Contributor

Describe the feature and the current behavior/state

When a command redefinition via for example \renewcommand changes argument specification of the command, currently both the old (generated previously for \newcommand) and new completion entries are remembered. Ideally the old completion entries should be dropped.

\documentclass{article}
\newcommand{\mycmd}[1]{code [#1]}
\renewcommand{\mycmd}[2]{code [#1][#2]}

\begin{document}
\mycmd
\end{document}

image

Who will benefit with this feature?

Users of LaTeX documents which alters argument specification(s) while redefining commands.

Any Other info

It occurred to me when reviewing #3924 and wondering "do \renew... commands need d1 modifier?"

@sunderme
Copy link
Member

sunderme commented Dec 26, 2024

This will not happen.
For this, txs would need to track the validity of each redefinition within a file as well as over where includes are placed.
The current architecture does not allow this and the effort seems too high for this corner case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants