-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make indentexpr evaluate from older vim scripts #14936
Conversation
929e0f2
to
a693fa0
Compare
ok, removed the import line. |
On Sun, Jun 9, 2024 at 9:52 AM Christian Brabandt ***@***.***> wrote:
Hm, I suppose if we make this change, we also don't need the import
statement anymore. @yegappan <https://github.com/yegappan> @dkearns
<https://github.com/dkearns> what is your opinion on this?
If there is a need to support using "indentexpr" from a legacy script, then
I don't see an issue with this change.
Regards,
Yegappan
|
so you want those changes because? Is this just because you need to manually call the |
There should probably be a builtin function to evaluate the |
the changes are so the plugin doesn't break with E121, it's the vim-stabs mentioned in the issue, which had been working ok until I upgraded a vim8 to 9.1. I could carry a patch to vim-stabs, or I could carry a patch in vim but if it benefits anyone else and seems like better not to break vim8 scripts, then why should the patch not go in? these reference exist:
don't know how to do anything more complicated with the patch, just cherry-picked the fix mentioned in the linked issue, because it fixed my problem. hope that it can be fixed one way or another, so older scripts don't get undefined error. |
To chime in with my use case: I've been running with a patch in my tree that exposes all vim9script |
Hm, it seems like those autoloaded functions are automatically translated into autoloadable form, in this case like |
@chrisbra is this patch useful in the meantime to fix vim8 users, before a more complete change can be made, or should the PR be closed? |
I have another idea how to fix this, probably doesn't matter, but I wanted to keep the import and didn't want to have to use the autoloaded name. Let's see how this works for you. |
solves my issue afaict; thanks. |
Older scripts have a problem with recent changes to indentexpr for vim9, they will see it as undefined variable E121. Patch avoids the error in vim8 script as mentioned by @monkoose in #14111 (comment)
Fixes #14111