Move (if|when)-let* shims to core.el

Fix void-functon when-let* errors at startup for Emacs 25.* users.
This commit is contained in:
Henrik Lissner 2019-03-08 18:06:35 -05:00
parent ee6e4a8b5c
commit e0ed8669af
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 12 deletions

View file

@ -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."

View file

@ -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)