core: minor refactor/reformat
+ Prefer cl-loop over cl-mapcan for performance reasons. + Remove unnecessary let form + Log doom-try-run-hook when doom-debug-mode is on.
This commit is contained in:
parent
adf9b7d26f
commit
600d7bcb4f
3 changed files with 13 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue