Handle wrong-num-of-args error correctly
This commit is contained in:
parent
e3daf2b818
commit
debdb63100
1 changed files with 13 additions and 14 deletions
|
@ -214,22 +214,21 @@ This should be run whenever your `doom!' block or update your packages."
|
||||||
package-activated-list ',package-activated-list)
|
package-activated-list ',package-activated-list)
|
||||||
(current-buffer))
|
(current-buffer))
|
||||||
(print! (green "✓ Cached package state"))
|
(print! (green "✓ Cached package state"))
|
||||||
|
|
||||||
;; insert package autoloads
|
;; insert package autoloads
|
||||||
(dolist (spec package-alist)
|
(dolist (spec package-alist)
|
||||||
(cl-destructuring-bind (pkg desc) spec
|
(if-let* ((pkg (car spec))
|
||||||
(unless (memq pkg doom-autoload-excluded-packages)
|
(desc (cadr spec)))
|
||||||
(let ((file
|
(unless (memq pkg doom-autoload-excluded-packages)
|
||||||
(abbreviate-file-name
|
(let ((file (concat (package--autoloads-file-name desc) ".el")))
|
||||||
(concat (package--autoloads-file-name desc) ".el"))))
|
(when (file-exists-p file)
|
||||||
(when (file-exists-p file)
|
(insert "(let ((load-file-name " (prin1-to-string (abbreviate-file-name file)) "))\n")
|
||||||
(insert "(let ((load-file-name " (prin1-to-string file) "))\n")
|
(insert-file-contents file)
|
||||||
(insert-file-contents file)
|
(while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\)" nil t)
|
||||||
(while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\)" nil t)
|
(unless (nth 8 (syntax-ppss))
|
||||||
(unless (nth 8 (syntax-ppss))
|
(replace-match "" t t)))
|
||||||
(replace-match "" t t)))
|
(unless (bolp) (insert "\n"))
|
||||||
(unless (bolp) (insert "\n"))
|
(insert ")\n"))))
|
||||||
(insert ")\n")))))))
|
(print! (yellow "⚠ Couldn't find package desc for %s" (car spec))))))
|
||||||
(print! (green "✓ Package autoloads included"))
|
(print! (green "✓ Package autoloads included"))
|
||||||
;; Remove `load-path' and `auto-mode-alist' modifications (most of them,
|
;; Remove `load-path' and `auto-mode-alist' modifications (most of them,
|
||||||
;; at least); they are cached later, so all those membership checks are
|
;; at least); they are cached later, so all those membership checks are
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue