diff --git a/modules/init-require.el b/modules/init-require.el index 67684085..9323e718 100644 --- a/modules/init-require.el +++ b/modules/init-require.el @@ -239,33 +239,35 @@ Please see Commentary in init-require.el for more details." ;; eval. `(,@(when (bound-and-true-p use-package-compute-statistics) `((use-package-statistics-gather :config ,feature nil))) - (if (featurep ,feature) - ,feature - (condition-case-unless-debug err - (unwind-protect - (if (< 3 (cl-count ,feature exordium--require-nesting-list)) - (error - "Recursive `exordium-require' for feature `%s', require-nesting-list: %s" - ,feature exordium--require-nesting-list) - (push ,feature exordium--require-nesting-list) - (exordium--require-load ,feature ,location) - (if (featurep ,feature) - ,feature - (if-let* ((file (caar load-history))) - (error "Loading file %s failed to provide feature `%s'" - file ,feature) - (error "Required feature `%s' was not provided" - ,feature)))) - (when (eq ,feature (car exordium--require-nesting-list)) - (pop exordium--require-nesting-list))) - (error - (display-warning 'exordium-require - (format "%s: %s" - ,feature (error-message-string err)))))) - ,@(when (bound-and-true-p use-package-compute-statistics) - `((use-package-statistics-gather :config ,feature t))) - ,@(when (bound-and-true-p use-package-compute-statistics) - `((use-package-statistics-gather :use-package ,feature t))))))) + (prog1 + (if (featurep ,feature) + ,feature + (condition-case-unless-debug err + (unwind-protect + (if (< 3 (cl-count ,feature exordium--require-nesting-list)) + (error + "Recursive `exordium-require' for feature `%s', require-nesting-list: %s" + ,feature exordium--require-nesting-list) + (push ,feature exordium--require-nesting-list) + (exordium--require-load ,feature ,location) + (if (featurep ,feature) + ,feature + (if-let* ((file (caar load-history))) + (error "Loading file %s failed to provide feature `%s'" + file ,feature) + (error "Required feature `%s' was not provided" + ,feature)))) + (when (eq ,feature (car exordium--require-nesting-list)) + (pop exordium--require-nesting-list))) + (error + (display-warning 'exordium-require + (format "%s: %s" + ,feature (error-message-string err))) + nil))) + ,@(when (bound-and-true-p use-package-compute-statistics) + `((use-package-statistics-gather :config ,feature t))) + ,@(when (bound-and-true-p use-package-compute-statistics) + `((use-package-statistics-gather :use-package ,feature t)))))))) (provide 'init-require)