From e0ed8669afe5b313e64cf52787f6248bc2502914 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Mar 2019 18:06:35 -0500 Subject: [PATCH] Move (if|when)-let* shims to core.el Fix void-functon when-let* errors at startup for Emacs 25.* users. --- core/core-lib.el | 13 ++----------- core/core.el | 8 +++++++- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 1deb4ae74..9fc5ee0aa 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -1,16 +1,7 @@ ;;; core-lib.el -*- lexical-binding: t; -*- -(eval-and-compile - (unless EMACS26+ - (with-no-warnings - ;; if-let and when-let were moved to (if|when)-let* in Emacs 26+ so we - ;; alias them for 25 users. - (defalias 'if-let* #'if-let) - (defalias 'when-let* #'when-let)))) - - ;; -;; Helpers +;;; Helpers (defun doom--resolve-path-forms (spec &optional directory) "Converts a simple nested series of or/and forms into a series of @@ -78,7 +69,7 @@ This is used by `associate!', `file-exists-p!' and `project-file-exists-p!'." ;; -;; Public library +;;; Public library (defun doom-unquote (exp) "Return EXP unquoted." diff --git a/core/core.el b/core/core.el index bc3543db7..1ab53ce60 100644 --- a/core/core.el +++ b/core/core.el @@ -460,7 +460,13 @@ to least)." (eval-and-compile (require 'subr-x) - (require 'cl-lib)) + (require 'cl-lib) + (unless EMACS26+ + (with-no-warnings + ;; if-let and when-let were moved to (if|when)-let* in Emacs 26+ so we + ;; alias them for 25 users. + (defalias 'if-let* #'if-let) + (defalias 'when-let* #'when-let)))) (add-to-list 'load-path doom-core-dir)