diff --git a/core/core-dispatcher.el b/core/core-dispatcher.el index ce980ad42..0c67eed0a 100644 --- a/core/core-dispatcher.el +++ b/core/core-dispatcher.el @@ -57,7 +57,8 @@ omitted, show all available commands, their aliases and brief descriptions." (cl-destructuring-bind (command &key desc body) (let ((sym (intern (car args)))) (or (assq sym doom--dispatch-command-alist) - (assq (cdr (assq sym doom--dispatch-alias-alist)) doom--dispatch-command-alist) + (assq (cdr (assq sym doom--dispatch-alias-alist)) + doom--dispatch-command-alist) (error "Invalid command: %s" (car args)))) (if help (apply #'doom--dispatch-help command desc (cdr args)) @@ -71,7 +72,8 @@ bin/doom help. BODY will be run when this dispatcher is called." (declare (doc-string 3)) - (cl-destructuring-bind (cmd &rest aliases) (doom-enlist command) + (cl-destructuring-bind (cmd &rest aliases) + (doom-enlist command) (macroexp-progn (append (when aliases diff --git a/core/core-modules.el b/core/core-modules.el index 8ec2a7710..a3d6035a4 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -94,8 +94,9 @@ Example: (unless (plist-member plist :path) (plist-put plist :path (or (plist-get old-plist :path) (doom-module-locate-path category module)))))) - (let ((key (cons category module))) - (puthash key plist doom-modules))) + (puthash (cons category module) + plist + doom-modules)) (defun doom-module-path (category module &optional file) "Like `expand-file-name', but expands FILE relative to CATEGORY (keywordp) and @@ -205,11 +206,10 @@ non-nil, return paths of possible modules, activated or otherwise." (remove-hook hook #',fn))) (map-delete doom--deferred-packages-alist ',name) (fmakunbound ',fn)))) - (cl-mapcan (lambda (hook) - (if (functionp hook) - `((advice-add #',hook :before #',fn)) - `((add-hook ',hook #',fn)))) - hooks) + (cl-loop for hook in hooks + collect (if (functionp hook) + `(advice-add #',hook :before #',fn) + `(add-hook ',hook #',fn))) `((map-put doom--deferred-packages-alist ',name '(,@hooks ,@(cdr (assq name doom--deferred-packages-alist))))) diff --git a/core/core.el b/core/core.el index e2a06c867..b931ed286 100644 --- a/core/core.el +++ b/core/core.el @@ -245,6 +245,8 @@ original value of `symbol-file'." easier to tell where the came from. Meant to be used with `run-hook-wrapped'." + (when doom-debug-mode + (message "Running doom hook: %s" hook)) (condition-case e (funcall hook) ((debug error)