From a2d14cd4925b16db5db6fd0dfe8a6a62c8a4415b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Jun 2016 15:39:04 -0400 Subject: [PATCH] Error handling in doom macro package loop --- core/core-defuns.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-defuns.el b/core/core-defuns.el index 63fa7e929..3ccc8236f 100644 --- a/core/core-defuns.el +++ b/core/core-defuns.el @@ -17,7 +17,11 @@ (defvar doom-current-font doom-default-font) (unless noninteractive - ,@(mapcar (lambda (pkg) `(require ',pkg)) + ,@(mapcar (lambda (pkg) + (let ((lib-path (locate-library (symbol-name pkg)))) + (unless lib-path + (error "Initfile not found: %s" pkg)) + `(require ',pkg ,(f-no-ext lib-path)))) packages) (when window-system (require 'server)