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

purescript-indentation.el: improve compiler visibility into local variables #19

Conversation

Hi-Angel
Copy link
Contributor

@Hi-Angel Hi-Angel commented Sep 12, 2024

Turning on lexical-binding fixes a bunch of warnings like:

purescript-indentation.el:399:47: Warning: ‘pi’ is an obsolete variable (as of 23.3); use ‘float-pi’ instead.

these warnings are caused by Emacs not being able to determine that pi is actually a local variable. By making use of lexical binding we make Emacs to be able to see through that.

@Hi-Angel Hi-Angel changed the title purescript-indentation.el: turn on lexical binding purescript-indentation.el: improve visibility into local variables Sep 12, 2024
Turning on lexical-binding fixes a bunch of warnings like:

    purescript-indentation.el:399:47: Warning: ‘pi’ is an obsolete variable (as of 23.3); use ‘float-pi’ instead.

these warnings are caused by Emacs not being able to determine that
`pi` is actually a local variable. By making use of lexical binding we
make Emacs to be able to see through that.
@Hi-Angel Hi-Angel force-pushed the turnon-indentation-lexical-binding branch from 6e47731 to c3d297c Compare September 12, 2024 15:30
@Hi-Angel Hi-Angel changed the title purescript-indentation.el: improve visibility into local variables purescript-indentation.el: improve compiler visibility into local variables Sep 12, 2024
@kritzcreek
Copy link
Contributor

Think you could figure out why the CI is failing here as well? Happy to merge after that. Thanks!

@Hi-Angel
Copy link
Contributor Author

Well, it fails because latest upstream Emacs expects "lexical-binding" directive to be in every file, that's a new warning.

I'll look at fixing that, but that said I don't think CI was ever passing here, because even that new error aside, it has other byte-compilation errors such as about docstring being too wide or unescaped characters usage in docstring, etc. Even the pi error I am fixing here has always been present.

@kritzcreek
Copy link
Contributor

Allright, in that case I'm happy to merge. Don't worry about fixing stuff that was already erroring.

@kritzcreek kritzcreek merged commit c3f0d6e into purescript-emacs:master Sep 30, 2024
6 of 10 checks passed
@Hi-Angel
Copy link
Contributor Author

@kritzcreek anyway, I went on and fixed all errors in this PR, please review 😊

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

Successfully merging this pull request may close these issues.

2 participants