From 7c89699e3fa3c3a06092c6bdb7f88fe1d33192b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Nov 2024 01:48:09 -0500 Subject: [PATCH] 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 --- lisp/doom.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/doom.el b/lisp/doom.el index 7edf08d7b..2de1f02c3 100644 --- a/lisp/doom.el +++ b/lisp/doom.el @@ -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.