nit: minor comment revision and refactors

This commit is contained in:
Henrik Lissner 2022-09-16 16:25:48 +02:00
parent 7ffe0df8eb
commit 732d87ac3e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
7 changed files with 13 additions and 20 deletions

View file

@ -306,7 +306,8 @@ OPTIONS:
(cl-defun doom-cli-help--render-commands (commands &key prefix grouped? docs? (inline? t))
(with-temp-buffer
(let* ((doom-print-indent 0)
(commands (seq-group-by (fn! (if grouped? (doom-cli-prop (doom-cli-get % t) :group))) (nreverse commands)))
(commands (seq-group-by (fn! (if grouped? (doom-cli-prop (doom-cli-get % t) :group)))
(nreverse commands)))
(toplevel (assq nil commands))
(rest (remove toplevel commands))
(drop (if prefix (length prefix) 0))

View file

@ -739,8 +739,8 @@ it doesn't make sense to slack."
;; We can't intercept C-g, so no point displaying any options for this key
;; when C-c is the proper way to abort batch Emacs.
(delq! "C-g" actions 'assoc)
;; HACK These are associated with opening dired or magit, which isn't
;; possible in tty Emacs, so...
;; HACK: These are associated with opening dired or magit, which isn't
;; possible in tty Emacs, so...
(delq! "e" actions 'assoc)
(delq! "g" actions 'assoc)
(if (doom-cli-context-suppress-prompts-p doom-cli--context)

View file

@ -868,7 +868,7 @@ executable context."
(cli (doom-cli-get command t))
(rcli (doom-cli-get command))
(key (doom-cli-key rcli)))
(doom-log "cli-context-parse: found %s" command)
(doom-log "cli-context-parse: found command %s" command)
;; Show warnings depending on CLI plists
(when (doom-cli-alias cli)
(dolist (pcli (doom-cli-path cli))
@ -1654,11 +1654,10 @@ ignored.
\(fn COMMANDSPEC ARGLIST [DOCSTRING] &rest BODY...)"
(declare (indent 2) (doc-string 3))
(let ((docstring (if (stringp (car body)) (pop body)))
(plist (let (plist)
(while (keywordp (car body))
(push (pop body) plist)
(push (pop body) plist))
(nreverse plist)))
(plist (cl-loop for (key val) on body by #'cddr
while (keywordp key)
collect (pop body)
collect (pop body)))
options arguments bindings)
(let ((type '&required))
(dolist (arg arglist)

View file

@ -5,9 +5,6 @@
;;
;;; Variables
(defvar doom-init-modules-p nil
"Non-nil if `doom-initialize-modules' has run.")
(defvar doom-modules (make-hash-table :test 'equal)
"A hash table of enabled modules. Set by `doom-initialize-modules'.")
@ -377,7 +374,7 @@ If ALL-P is `real', only return *real"
(use-package-concat
`((fset ',fn
(lambda (&rest _)
(doom-log "Loading deferred package %s from %s" ',name ',fn)
(doom-log "use-package: lazy loading %s from %s" ',name ',fn)
(condition-case e
;; If `default-directory' is a directory that doesn't
;; exist or is unreadable, Emacs throws up file-missing

View file

@ -143,11 +143,7 @@ uses a straight or package.el command directly).")
(list "/emacs-jupyter.*\\.el\\'"
"/evil-collection-vterm\\.el\\'"
"/vterm\\.el\\'"
"/with-editor\\.el\\'")))
;; Remove unwanted $EMACSDIR/eln-cache/ directory.
(cl-callf2 delete (file-name-concat doom-emacs-dir "eln-cache/")
native-comp-eln-load-path))
"/with-editor\\.el\\'"))))
;;

View file

@ -274,7 +274,7 @@ variable for an explanation of the defaults (in comments). See
Unlike `evil-collection-init', this respects `+evil-collection-disabled-list',
and complains if a module is loaded too early (during startup)."
(unless (memq (or (car-safe module) module) disabled-list)
(doom-log "Initialized evil-collection-%s %s"
(doom-log "editor:evil: loading evil-collection-%s %s"
(or (car-safe module) module)
(if doom-init-time "" "(too early!)"))
(with-demoted-errors "evil-collection error: %s"

View file

@ -226,7 +226,7 @@ https://emacs.stackexchange.com/questions/10230/how-to-indent-keywords-aligned"
;;;###autoload
(defun +emacs-lisp-extend-imenu-h ()
"Improve imenu support in `emacs-lisp-mode', including recognition for Doom's API."
"Improve imenu support in `emacs-lisp-mode' for Doom's APIs."
(setq imenu-generic-expression
`(("Section" "^[ \t]*;;;;*[ \t]+\\([^\n]+\\)" 1)
("Evil commands" "^\\s-*(evil-define-\\(?:command\\|operator\\|motion\\) +\\(\\_<[^ ()\n]+\\_>\\)" 1)