From c8d2556483bcfb383ccb49cf2658fc7b58f51d16 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Tue, 16 Jul 2019 05:59:55 +0800 Subject: [PATCH] When `if-let*` or `when-let*` was defined, don't do alias for it. Some package may alias it (or define a enhance version) before the loading of `doom-modeline` Use `eval-and-compile`, allow byte-compiler see through the form, is better than using `with-no-warnings` to suppress it rigidly. --- doom-modeline-core.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index dab3885..2a4532a 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -37,11 +37,11 @@ ;; Compatibilities ;; -(unless (>= emacs-major-version 26) - (with-no-warnings +(eval-and-compile + (unless (>= emacs-major-version 26) ;; Define `if-let*' and `when-let*' variants for 25 users. - (defalias 'if-let* #'if-let) - (defalias 'when-let* #'when-let))) + (unless (fboundp 'if-let*) (defalias 'if-let* #'if-let)) + (unless (fboundp 'when-let*) (defalias 'when-let* #'when-let)))) ;; Don’t compact font caches during GC. (if (eq system-type 'windows-nt)