Skip to content

Use if-let* / when-let* instead of the obsolete plain forms - #68

Merged
zonuexe merged 1 commit into
masterfrom
chore/obsolete-macros
Jul 17, 2026
Merged

Use if-let* / when-let* instead of the obsolete plain forms#68
zonuexe merged 1 commit into
masterfrom
chore/obsolete-macros

Conversation

@zonuexe

@zonuexe zonuexe commented Jul 17, 2026

Copy link
Copy Markdown
Member

if-let and when-let are obsolete as of Emacs 31.1, and the byte compiler warns about all three uses (phpstan.el:483, phpstan-hover.el:246 and :335). Each binds a single value, so the starred forms are a direct, behaviour-preserving replacement. Both are available on the supported Emacs (27.1+) through subr-x — verified by loading the sources uncompiled on Emacs 27.2 and exercising the if-let* path.

Compilation is now warning-free on Emacs 27.2 and current master Emacs; the test suite still passes (15/15).

`if-let' and `when-let' are obsolete as of Emacs 31.1, and the byte
compiler warns about all three uses here.  Each binds a single value, so
the starred forms are a direct, behaviour-preserving replacement.  Both
are available on the supported Emacs (27.1+) through subr-x.
@zonuexe
zonuexe merged commit 2de1e0b into master Jul 17, 2026
9 checks passed
@zonuexe
zonuexe deleted the chore/obsolete-macros branch July 17, 2026 16:57
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