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

Use lexical binding in utils.el #28

Merged
merged 2 commits into from
Feb 10, 2024
Merged

Conversation

Hi-Angel
Copy link
Contributor

@Hi-Angel Hi-Angel commented Feb 9, 2024

Upstream Emacs has enabled warnings for .el files with no lexical-binding directive, so this file triggers a:

In toplevel form:
utils.el:1:1: Warning: file has no ‘lexical-binding’ directive on its first line

Fix that.

`add-to-list` can't be used with lexical binding, which is probably
why its documentation discourages the use. So replace this with `push`

Fixes compilation error:

    In refman2func-doc:
    utils.el:29:12: Error: ‘add-to-list’ can’t use lexical var ‘functions’; use ‘push’ or ‘cl-pushnew’
Upstream Emacs has enabled warnings for `.el` files with no
lexical-binding directive, so this file triggers a:

    In toplevel form:
    lsp.el:1:1: Warning: file has no ‘lexical-binding’ directive on its first line

Fix that.
@wentasah
Copy link
Owner

Thank you. I'll merge this to get rid of the warning. However, this code is probably not much useful nowadays, since the format of the reference documentation, which this code should "parse", has changed.

@wentasah wentasah merged commit f9db5c6 into wentasah:master Feb 10, 2024
8 checks passed
@Hi-Angel
Copy link
Contributor Author

Yeah, I too didn't find the file the function was referring to in Meson sources. But I didn't even find it in the history, so I wasn't sure if it's still useful (e.g. to parse some other file), so decided to leave it as is.

Btw, I was just working on fixing yet another warning 😅 Will send as a separte PR then, it should be the last one present in meson-mode.

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