Skip to content

Defvars cleanup #53

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

Merged
merged 10 commits into from
May 13, 2025
Merged

Defvars cleanup #53

merged 10 commits into from
May 13, 2025

Conversation

Hi-Angel
Copy link
Member

@Hi-Angel Hi-Angel commented May 10, 2025

This does defvar cleanup; most notably it moves purescript-literate to a shared location to make other files stop doing (defvar purescript-literate), and it replaces some defvar + make-local-variable chains with just defvar-local.

Hi-Angel added 3 commits May 10, 2025 15:56
It was defined with `defvar` and then made into buffer-local
with (make-variable-buffer-local). The call though was only executed
once, which is likely an omission as even the documentation states the
variable supposed to be buffer-local.

So fix that and make it truly buffer-local.
It was defined with `defvar` and then made into buffer-local
with (make-variable-buffer-local). The call though was only executed
once, which is likely an omission.

Fix that and make it truly buffer-local.
This gets rid of repeated "defvar"s in different files by instead
importing the variable from a shared location.
Hi-Angel added 7 commits May 10, 2025 17:27
Now that it's exported from a common location, there's no reason it
shouldn't be (besides a bug of course).
All supported Emacs versions have the variable, so no need to have it
defined still.
…local

There's no reason for killing (I even checked other major modes), and
the make-local-variable may be replaced by just setq-local.
It's been there since 2019 and the variable has been no-op since then
as well. I think it's fair to assume anyone who were still using the
variable either moved on, or if they didn't notice anything, they will
probably keep not noticing anything, because the variable has been
no-op for so long.
@Hi-Angel Hi-Angel merged commit 1460a7e into purescript-emacs:master May 13, 2025
5 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.

1 participant