From c51b2d42ad3e4e839ffa9c27b642edbd8ded3d5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Apr 2020 02:33:24 -0400 Subject: [PATCH] Remove require! macro This was meant for unit tests, which is where it will be moved to. --- core/core-modules.el | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index 372872c5f..f3c22fb71 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -481,39 +481,6 @@ WARNINGS: (lambda () ,@body) 'append))) -(defmacro require! (category module &rest flags) - "Loads the CATEGORY MODULE module with FLAGS. - -CATEGORY is a keyword, MODULE is a symbol and FLAGS are symbols. - - (require! :lang php +lsp) - -This is for testing and internal use. This is not the correct way to enable a -module." - `(let ((doom-modules (or ,doom-modules (doom-modules))) - (module-path (doom-module-locate-path ,category ',module))) - (doom-module-set - ,category ',module - (let ((plist (doom-module-get ,category ',module))) - ,(when flags - `(plist-put plist :flags `,flags)) - (unless (plist-member plist :path) - (plist-put plist :path ,(doom-module-locate-path category module))) - plist)) - (if (directory-name-p module-path) - (condition-case-unless-debug ex - (let ((doom--current-module ',(cons category module)) - (doom--current-flags ',flags)) - (load! "init" module-path :noerror) - (load! "config" module-path :noerror)) - ('error - (lwarn 'doom-modules :error - "%s in '%s %s' -> %s" - (car ex) ,category ',module - (error-message-string ex)))) - (warn 'doom-modules :warning "Couldn't find module '%s %s'" - ,category ',module)))) - (defmacro featurep! (category &optional module flag) "Returns t if CATEGORY MODULE is enabled.