fix: silence (if|when)-let deprecation warnings

Seems these two macros were marked obsolete very recently on Emacs 31.1
in favor of (if|when)-let*. Since the change seems premature (judging
from the mailing list discussion), and because I disagree with the
change (and will redefine (if|when)-let if they actually go through with
removing them), I simply silence the warnings altogether. They're not
helpful for the end user and end up only spamming them with unactionable
warnings.

I'll wait until upstream figures it out before I make any decisions.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
This commit is contained in:
Henrik Lissner
2024-11-03 01:48:09 -05:00
parent 8cafbe4408
commit 7c89699e3f

View File

@@ -177,6 +177,14 @@
(make-obsolete-variable 'MODULES "Use (featurep 'dynamic-modules) instead" "3.0.0")
(make-obsolete-variable 'NATIVECOMP "Use (featurep 'native-compile) instead" "3.0.0"))
;; HACK: Silence obnoxious obsoletion warnings about (if|when)-let in >=31.
;; These warnings are unhelpful to end-users, and so, so many packages use
;; these macros so rather than hopelessly pester them, I'll silence them. Not
;; to mention, Emacs doesn't respect `warning-suppress-types' when it comes to
;; obsoletion warnings.
(put 'if-let 'byte-obsolete-info nil)
(put 'when-let 'byte-obsolete-info nil)
;;; Fix $HOME on Windows
;; $HOME isn't normally defined on Windows, but many unix tools expect it.