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

Fixing all byte-compilation errors #20

Merged
merged 7 commits into from
Sep 30, 2024

Conversation

Hi-Angel
Copy link
Contributor

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

Per discussion here, I decided to fix byte-compilation errors that are currently present in the package. As a bonus, this enables lexical binding everywhere, so Emacs will have better introspection into the package, thus enabling more optimizations.

Each error is being fixed in its own commit.

On my latest Emacs from upstream this branch currently passes with no errors.

Fixes warnings:

    purescript-font-lock.el:448:2: Error: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')
    purescript-indent.el:1321:2: Error: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')
    purescript-mode.el:88:2: Error: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')
It's reserved for unused variables. Fixes a warning:
    purescript-mode.el:63:11: Error: variable ‘_version’ not left unused
Fixes:
    purescript-indent.el:437:19: Error: Unused lexical variable ‘errlist’
    purescript-indent.el:1295:34: Error: Unused lexical argument ‘start’
    purescript-mode.el:416:44: Error: Unused lexical argument ‘info’
Fixes:

    purescript-navigate-imports.el:101:12: Error: Unused lexical variable ‘point’
    purescript-simple-indent.el:146:10: Error: Unused lexical variable ‘point’
Fixes:
    purescript-sort-imports.el:41:4: Error: Doc string after ‘interactive’
Upstream Emacs has made lack of the directive a warning. So enable it
explicitly everywhere. It provides various benefits such as better
introspection by the compiler into the code and optimizations.

Fixes a bunch of warnings:

      Error: file has no ‘lexical-binding’ directive on its first line
@Hi-Angel
Copy link
Contributor Author

Each error is being fixed in its own commit.

Though I have two separate commits for fixing "unused lexical variable": one is a trivial rename of the arguments, and the other is removing let-bindings with a unused variable. The latter involves changing indentation, so I figured if there'd be a regression, would be better to have this change separated (but ofc hopefully there won't be any, shouldn't be at least 😊).

@kritzcreek
Copy link
Contributor

Thank you very much!

@kritzcreek kritzcreek merged commit d187b3d into purescript-emacs:master Sep 30, 2024
10 checks passed
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