;; -*- lisp-interaction -*- ;; vim: set ft=lisp: ;; command=("emacs" "--load" "/home/fdr/.emacs.d/bin/doom" "--" "up") ;; date="2024-04-01 17-53-43" ;;;; ENVIRONMENT GNU Emacs v29.3 nil Doom core v3.0.0-pre HEAD -> master 286be1b24 2024-03-24 18:55:43 -0400 Doom modules v24.03.0-pre HEAD -> master 286be1b24 2024-03-24 18:55:43 -0400 ;;;; 0 ((doom-compile-clean) ((debugger-may-continue . t) (inhibit-redisplay) (inhibit-debugger . t) (inhibit-changing-match-data))) ;;;; 1 ((let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))) ((doom-print-level . notice) (doom-print-indent . 2))) ;;;; 2 ((progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10))))) nil) ;;;; 3 ((if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))) nil) ;;;; 4 ((cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))))) nil) ;;;; 5 ((let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10))))))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (auto-accept-p) (force-p) (branch . "master") (target-remote . "_upgrade_master") (result 0 . "From https://github.com/doomemacs/doomemacs\n * [new branch] master -> _upgrade/master") (this-rev . "286be1b2496a3ffa2280a16a41f56babebea93f0") (new-rev . "5f5a163c49207a7083ab1ecc9e78d268fd6600b8"))) ;;;; 6 ((let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (error "Failed to add %s to remotes" doom-upgrade-remote)) (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-upgrade-remote (format "%s:%s" branch target-remote))))) (error "Failed to fetch from upstream")) (let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (auto-accept-p) (force-p) (branch . "master") (target-remote . "_upgrade_master") (result 0 . "From https://github.com/doomemacs/doomemacs\n * [new branch] master -> _upgrade/master"))) ;;;; 7 ((unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (error "Failed to add %s to remotes" doom-upgrade-remote)) (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-upgrade-remote (format "%s:%s" branch target-remote))))) (error "Failed to fetch from upstream")) (let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))))))) (condition-case nil (progn (sh! "git" "branch" "-D" target-remote) (sh! "git" "remote" "remove" doom-upgrade-remote)) (error nil))) nil) ;;;; 8 ((let* ((branch (replace-regexp-in-string "^\\(?:[^/]+/[^/]+/\\)?\\(.+\\)\\(?:~[0-9]+\\)?$" "\\1" (cdr (sh! "git" "name-rev" "--name-only" "HEAD")))) (target-remote (format "%s_%s" doom-upgrade-remote branch))) (if branch nil (error (if (let ((p (let ((file ".git")) (and (stringp file) (let ((default-directory doom-emacs-dir)) (file-exists-p file)) file)))) (and p (expand-file-name p doom-emacs-dir))) "Couldn't find Doom's .git directory. Was Doom cloned properly?" "Couldn't detect what branch you're on. Is Doom detached?"))) (let* ((dirty (and t (doom-upgrade--working-tree-dirty-p default-directory)))) (if dirty (if (not force-p) (user-error "%s\n\n%s\n\n %s" (format "Refusing to upgrade because %S has been modified." (abbreviate-file-name doom-emacs-dir)) "Either stash/undo your changes or run 'doom upgrade --force' to discard local changes." (string-join dirty "\n")) (doom-print (doom-print--format (doom-print--class 'item "You have local modifications in Doom's source. Discarding them..."))) (sh! "git" "reset" "--hard" (format "origin/%s" branch)) (sh! "git" "clean" "-ffd")) nil)) (sh! "git" "remote" "remove" doom-upgrade-remote) (unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (error "Failed to add %s to remotes" doom-upgrade-remote)) (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-upgrade-remote (format "%s:%s" branch target-remote))))) (error "Failed to fetch from upstream")) (let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))))))) (condition-case nil (progn (sh! "git" "branch" "-D" target-remote) (sh! "git" "remote" "remove" doom-upgrade-remote)) (error nil)))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (auto-accept-p) (force-p) (branch . "master") (target-remote . "_upgrade_master"))) ;;;; 9 ((let ((default-directory doom-emacs-dir) process-file-side-effects) (doom-print (doom-print--format (doom-print--class 'start "Preparing to upgrade Doom Emacs and its packages..."))) (let* ((branch (replace-regexp-in-string "^\\(?:[^/]+/[^/]+/\\)?\\(.+\\)\\(?:~[0-9]+\\)?$" "\\1" (cdr (sh! "git" "name-rev" "--name-only" "HEAD")))) (target-remote (format "%s_%s" doom-upgrade-remote branch))) (if branch nil (error (if (let ((p (let ((file ".git")) (and (stringp file) (let ((default-directory doom-emacs-dir)) (file-exists-p file)) file)))) (and p (expand-file-name p doom-emacs-dir))) "Couldn't find Doom's .git directory. Was Doom cloned properly?" "Couldn't detect what branch you're on. Is Doom detached?"))) (let* ((dirty (and t (doom-upgrade--working-tree-dirty-p default-directory)))) (if dirty (if (not force-p) (user-error "%s\n\n%s\n\n %s" (format "Refusing to upgrade because %S has been modified." (abbreviate-file-name doom-emacs-dir)) "Either stash/undo your changes or run 'doom upgrade --force' to discard local changes." (string-join dirty "\n")) (doom-print (doom-print--format (doom-print--class 'item "You have local modifications in Doom's source. Discarding them..."))) (sh! "git" "reset" "--hard" (format "origin/%s" branch)) (sh! "git" "clean" "-ffd")) nil)) (sh! "git" "remote" "remove" doom-upgrade-remote) (unwind-protect (let (result) (or (= 0 (car (sh! "git" "remote" "add" doom-upgrade-remote doom-upgrade-url))) (error "Failed to add %s to remotes" doom-upgrade-remote)) (or (= 0 (car (setq result (sh! "git" "fetch" "--force" "--tags" doom-upgrade-remote (format "%s:%s" branch target-remote))))) (error "Failed to fetch from upstream")) (let ((this-rev (cdr (sh! "git" "rev-parse" "HEAD"))) (new-rev (cdr (sh! "git" "rev-parse" target-remote)))) (cond ((and (null this-rev) (null new-rev)) (error "Failed to get revisions for %s" target-remote)) ((equal this-rev new-rev) (doom-print (doom-print--format (doom-print--class 'success "Doom is already up-to-date!"))) nil) ((doom-print (doom-print--format (doom-print--class 'item "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n" (substring this-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" "HEAD")) (substring new-rev 0 10) (cdr (sh! "git" "log" "-1" "--format=%cr" target-remote))))) (let ((diff-url (format "%s/compare/%s...%s" doom-upgrade-url this-rev new-rev))) (doom-print (doom-print--format "Link to diff: %s" diff-url)) (if (and (not auto-accept-p) (y-or-n-p "View the comparison diff in your browser?")) (progn (doom-print (doom-print--format (doom-print--class 'item "Opened github in your browser."))) (browse-url diff-url)))) (if (not (or auto-accept-p (y-or-n-p "Proceed with upgrade?"))) (ignore (doom-print (doom-print--format (doom-print--class 'error "Aborted")))) (doom-print (doom-print--format (doom-print--class 'start "Upgrading Doom Emacs..."))) (progn (let ((doom-print-level (or nil doom-print-level)) (doom-print-indent (+ (if t (or nil doom-print-indent-increment) 0) doom-print-indent))) (doom-compile-clean) (doom-cli-context-put context 'straight-recipe (doom-upgrade--get-straight-recipe)) (or (and (= 0 (car (sh! "git" "reset" "--hard" target-remote))) (equal (cdr (sh! "git" "rev-parse" "HEAD")) new-rev)) (error "Failed to check out %s" (substring new-rev 0 10)))))))))) (condition-case nil (progn (sh! "git" "branch" "-D" target-remote) (sh! "git" "remote" "remove" doom-upgrade-remote)) (error nil))))) ((default-directory . "/home/fdr/.emacs.d/") (process-file-side-effects))) ;;;; 10 ((doom-cli-upgrade #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil) nil nil) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (auto-accept-p) (force-p))) ;;;; 11 ((cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))) nil) ;;;; 12 ((let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))) ((cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (alist (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)) (packages?) (jobs) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (force?) (sync-cmd "sync" "-u" "-B"))) ;;;; 13 ((let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))) ((cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (alist (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)) (packages?) (jobs) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)))) ;;;; 14 (((closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))) #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) ((cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (alist (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)))) ;;;; 15 ((funcall (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))) #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) nil) ;;;; 16 ((doom-cli-execute #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) ((cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (bindings (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)))) ;;;; 17 ((let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom") (seen t) (runners (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (tail (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (x15 #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)) (x16 . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (x17 (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)) (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (bindings (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)))) ;;;; 18 ((let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom") (seen t) (runners (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (tail (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (x15 #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)) (x16 . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (x17 (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)))) ;;;; 19 ((progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) nil) ;;;; 20 ((let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom") (seen t) (runners (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (tail (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (x15 #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?)))) ;;;; 21 ((while tail (let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail)))) nil) ;;;; 22 ((let ((tail (nreverse runners))) (while tail (let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail))))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom") (seen t) (runners (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))) (tail (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))))) ;;;; 23 ((let ((seen '(t)) runners) (let ((tail (doom-cli-find command (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2))))) (while tail (let ((cli (car tail))) (setq runners (cons (cons (doom-cli-get cli) (doom-cli--bindings cli context seen)) runners)) (setq tail (cdr tail))))) (let ((tail (nreverse runners))) (while tail (let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail))))) context) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom") (seen t) (runners (#s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd))))))) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (jobs) (packages?))))) ;;;; 24 ((cond ((null (or command (doom-cli-get (list prefix) t))) (signal 'doom-cli-invalid-prefix-error (list prefix))) ((progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 8)) (let* ((val (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 8)))) (cond ((equal val '"--version") (let nil (doom-cli-call (cons ':version (cdr command)) context) t)) ((member val '("--help" "-?")) (let nil (doom-cli-call (cons ':help (cdr command)) context) t)) (t (let nil (error "In meta mode with no destination!")))))) ((not (and cli (let ((cl-x (doom-cli-get cli))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cl-x))) (aref cl-x 9))))) (signal 'doom-cli-command-not-found-error (append command (alist-get t (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 14)))))) ((let ((seen '(t)) runners) (let ((tail (doom-cli-find command (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2))))) (while tail (let ((cli (car tail))) (setq runners (cons (cons (doom-cli-get cli) (doom-cli--bindings cli context seen)) runners)) (setq tail (cdr tail))))) (let ((tail (nreverse runners))) (while tail (let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail))))) context))) nil) ;;;; 25 ((let* ((command (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 10))) (cli (doom-cli-get command t)) (prefix (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 7)))) (if doom-inhibit-log nil (doom--log "context-execute: %s" (mapconcat #'doom-cli-command-string (delq nil (list (car (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 11))) command)) " -> "))) (cond ((null (or command (doom-cli-get (list prefix) t))) (signal 'doom-cli-invalid-prefix-error (list prefix))) ((progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 8)) (let* ((val (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 8)))) (cond ((equal val '"--version") (let nil (doom-cli-call (cons ':version (cdr command)) context) t)) ((member val '("--help" "-?")) (let nil (doom-cli-call (cons ':help (cdr command)) context) t)) (t (let nil (error "In meta mode with no destination!")))))) ((not (and cli (let ((cl-x (doom-cli-get cli))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cl-x))) (aref cl-x 9))))) (signal 'doom-cli-command-not-found-error (append command (alist-get t (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 14)))))) ((let ((seen '(t)) runners) (let ((tail (doom-cli-find command (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2))))) (while tail (let ((cli (car tail))) (setq runners (cons (cons (doom-cli-get cli) (doom-cli--bindings cli context seen)) runners)) (setq tail (cdr tail))))) (let ((tail (nreverse runners))) (while tail (let ((x15 (car tail))) (progn (ignore (consp x15)) (let* ((x16 (car-safe x15)) (x17 (cdr-safe x15))) (let ((cli x16) (bindings x17)) (doom-cli-execute cli bindings)))) (setq tail (cdr tail))))) context)))) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (command "doom" "upgrade") (cli . #s(doom-cli ("doom" "upgrade") nil (("SUMMARY" . "Updates Doom and packages.") ("MAIN" . "This requires that ~/.emacs.d is a git repo, and is the equivalent of the") ("following shell commands" . "\n cd ~/.emacs.d\n git pull --rebase\n doom clean\n doom sync -u")) nil nil (#s(doom-cli-option packages? "Only upgrade packages, not Doom" nil nil ("-p" "--packages") nil nil) #s(doom-cli-option jobs "How many CPUs to use for native compilation" nil nil ("-j" "--jobs") (num) nil)) ((&context context)) (:prefix (doom) :group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil) (closure (t) (cli alist) (let ((packages? (cdr (assq 'packages? alist))) (jobs (cdr (assq 'jobs alist))) (context (cdr (assq 'context alist)))) (let* ((force? (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 6))) (sync-cmd (append '("sync" "-u" "-B") (if jobs (list "-j" num))))) (cond (packages? (let ((recipe (doom-cli-context-get context 'straight-recipe))) (if (and recipe (not (equal recipe (doom-upgrade--get-straight-recipe)))) (progn (doom-print (doom-print--format (doom-print--class 'item "Preparing straight for an update"))) (delete-directory (doom-path straight-base-dir "straight/repos/straight.el") 'recursive)))) (call! sync-cmd) (doom-print (doom-print--format (doom-print--class 'success "Finished upgrading Doom Emacs")))) ((doom-cli-upgrade context force? force?) (doom-print (doom-print--format (doom-print--class 'item "Reloading Doom Emacs"))) (exit! "doom" "upgrade" "-p" (if force? "--force") (if jobs (format "--jobs=%d" jobs)))) ((doom-print (doom-print--format "Doom is up-to-date!")) (call! sync-cmd)))))))) (prefix . "doom"))) ;;;; 26 ((doom-cli-context-execute #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) ((context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)))) ;;;; 27 ((let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) nil) ;;;; 28 ((let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) ((prefix . "doom") (args ("up")) (args "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (write-logs-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-write-logs-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (show-benchmark-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-benchmark-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (doomctxt . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (streamspec (>= notice #) (t . #)) (vnew closure ((streams (#[128 "\302\301\303\300\4\"\"\207" [(0 2) >= apply append] 6 "\n\n(fn &rest ARGS2)"] . #) (t . #)) (old . #) (level . debug)) (message &rest args) (if message (progn (let ((output (apply #'doom-print--format message args))) (if (<= doom-print--output-depth 1) (doom-print output :level level :stream t) (let ((doom-print--output-depth (1- doom-print--output-depth))) (funcall old "%s" output))) (let ((tail streams)) (while tail (let ((stream (car tail))) (if (or (eq (car stream) t) (funcall (car stream))) (progn (doom-print output :stream (cdr stream)))) (setq tail (cdr tail)))))) message))) (old . #) (args "doom" "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)))) ;;;; 29 ((condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) nil) ;;;; 30 ((doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context) nil) ;;;; 31 ((progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)) nil) ;;;; 32 ((let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context))) ((doom-print--output-depth . 1))) ;;;; 33 ((progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) nil) ;;;; 34 ((unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old)) nil) ;;;; 35 ((let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old))) ((prefix . "doom") (args ("up")) (args "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (write-logs-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-write-logs-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (show-benchmark-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-benchmark-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (doomctxt . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (streamspec (>= notice #) (t . #)) (vnew closure ((streams (#[128 "\302\301\303\300\4\"\"\207" [(0 2) >= apply append] 6 "\n\n(fn &rest ARGS2)"] . #) (t . #)) (old . #) (level . debug)) (message &rest args) (if message (progn (let ((output (apply #'doom-print--format message args))) (if (<= doom-print--output-depth 1) (doom-print output :level level :stream t) (let ((doom-print--output-depth (1- doom-print--output-depth))) (funcall old "%s" output))) (let ((tail streams)) (while tail (let ((stream (car tail))) (if (or (eq (car stream) t) (funcall (car stream))) (progn (doom-print output :stream (cdr stream)))) (setq tail (cdr tail)))))) message))) (old . #))) ;;;; 36 ((let ((standard-output (doom-print--redirect-standard-output streamspec t))) (let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old)))) ((standard-output closure ((streams (t . #) (t . #)) (level . t)) (ch) (let ((str (char-to-string ch))) (let ((tail streams)) (while tail (let ((stream (car tail))) (if (or (eq (car stream) t) (funcall (car stream))) (progn (doom-print str :newline nil :stream (cdr stream)))) (setq tail (cdr tail))))) (doom-print str :newline nil :stream t :level level))))) ;;;; 37 ((let ((streamspec (list (list '>= 'notice (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 16))) (cons t (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 17)))))) (let ((standard-output (doom-print--redirect-standard-output streamspec t))) (let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old))))) ((prefix . "doom") (args ("up")) (args "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (write-logs-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-write-logs-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (show-benchmark-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-benchmark-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (doomctxt . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (streamspec (>= notice #) (t . #)))) ;;;; 38 ((let* ((doomctxt context) (debugger (doom-rpartial #'doom-cli-debugger doomctxt)) (debug-on-error t)) (let ((streamspec (list (list '>= 'notice (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 16))) (cons t (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 17)))))) (let ((standard-output (doom-print--redirect-standard-output streamspec t))) (let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old)))))) ((prefix . "doom") (args ("up")) (args "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (write-logs-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-write-logs-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (show-benchmark-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-benchmark-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (doomctxt . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (debugger closure ((args #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (fn . doom-cli-debugger)) (&rest pre-args) (apply fn (append pre-args args))) (debug-on-error . t))) ;;;; 39 ((let* ((args (flatten-list args)) (context (make-doom-cli-context :prefix prefix :whole args)) (doom-cli--context context) (write-logs-fn (doom-partial #'doom-cli--output-write-logs-h context)) (show-benchmark-fn (doom-partial #'doom-cli--output-benchmark-h context))) (let* ((doomctxt context) (debugger (doom-rpartial #'doom-cli-debugger doomctxt)) (debug-on-error t)) (let ((streamspec (list (list '>= 'notice (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 16))) (cons t (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 17)))))) (let ((standard-output (doom-print--redirect-standard-output streamspec t))) (let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old))))))) ((prefix . "doom") (args ("up")) (args "up") (context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) (write-logs-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-write-logs-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (show-benchmark-fn . #[128 "\302\301\303\300\4\"\"\207" [(#s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)) doom-cli--output-benchmark-h apply append] 6 "\n\n(fn &rest ARGS2)"]) (doom-cli--context . #s(doom-cli-context (26122 30231 755443 907000) 9413 0 (188 . 52) nil nil "doom" nil nil ("doom" "upgrade") (("doom" "upgrade") ("doom" "up")) ("up") (("--jobs") ("-j") ("--packages") ("-p") ("--eval") ("-E") ("--strict-load") ("--load") ("-L") ("--color") ("--benchmark") ("--profile") ("--pager") ("--emacsdir") ("--doomdir") ("--verbose") ("-v") ("--debug") ("-D") ("--force") ("-!")) ((t) (("doom" "upgrade")) (("doom") "up")) # # # nil)))) ;;;; 40 ((let ((doom-context doom-context)) (let ((tail (ensure-list 'cli))) (while tail (let ((context (car tail))) (doom-context-push context) (setq tail (cdr tail))))) (let* ((args (flatten-list args)) (context (make-doom-cli-context :prefix prefix :whole args)) (doom-cli--context context) (write-logs-fn (doom-partial #'doom-cli--output-write-logs-h context)) (show-benchmark-fn (doom-partial #'doom-cli--output-benchmark-h context))) (let* ((doomctxt context) (debugger (doom-rpartial #'doom-cli-debugger doomctxt)) (debug-on-error t)) (let ((streamspec (list (list '>= 'notice (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 16))) (cons t (progn (or (progn (and (memq (type-of doomctxt) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context doomctxt))) (aref doomctxt 17)))))) (let ((standard-output (doom-print--redirect-standard-output streamspec t))) (let* ((vnew (doom-print--redirect-message streamspec (if noninteractive 'debug 'notice))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (let ((doom-print--output-depth (1+ doom-print--output-depth))) (progn (if doom-inhibit-log nil (doom--log "run!: %s %s" prefix (combine-and-quote-strings args))) (add-hook 'kill-emacs-hook show-benchmark-fn 94) (add-hook 'kill-emacs-hook write-logs-fn 95) (if (doom-cli-context-pipe-p context :out t) (progn (setq doom-print-backend nil))) (if (doom-cli-context-pipe-p context :in) (progn (save-current-buffer (set-buffer (progn (or (progn (and (memq (type-of context) cl-struct-doom-cli-context-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-context context))) (aref context 15))) (while (let* ((in (and t (condition-case nil (progn (read-from-minibuffer "")) (error nil))))) (if in (insert in "\n") (condition-case nil (progn (delete-char -1)) (error nil)))))))) (doom-cli--exit (condition-case e (let* ((args (cons (if (getenv "__DOOMDUMP") :dump prefix) args)) (context (doom-cli-context-restore (getenv "__DOOMCONTEXT") context)) (context (doom-cli-context-parse args context))) (run-hook-with-args 'doom-cli-before-run-functions context) (let ((result (doom-cli-context-execute context))) (run-hook-with-args 'doom-cli-after-run-functions context result)) 0) (doom-cli-wrong-number-of-arguments-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x26 (car-safe val)) (x27 (cdr-safe val))) (progn (ignore (consp x27)) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (progn (ignore (consp x29)) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (progn (ignore (consp x31)) (let* ((x32 (car-safe x31)) (x33 (cdr-safe x31))) (progn (ignore (consp x33)) (let* ((x34 (car-safe x33)) (x35 (cdr-safe x33))) (progn (ignore (null x35)) (let ((command x26) (flag x28) (args x30) (min x32) (max x34)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %S expected %s argument%s, but got %d") (or flag (doom-cli-command-string (if (keywordp (car command)) command (cdr command)))) (if (or (= min max) (= max most-positive-fixnum)) min (format "%d-%d" min max)) (if (or (= min 0) (> min 1)) "s" "") (length args))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e))))))))))))))) 5) (doom-cli-unrecognized-option-error (doom-print (doom-print--format (doom-print--style 'red "Error: unknown option %s") (car (cdr e)))) (doom-cli-call (cons ':help (cons "--synopsis" (cons "--postamble" (cdr (doom-cli--command context))))) context e) 5) (doom-cli-invalid-option-error (let* ((val (cdr e))) (progn (ignore (consp val)) (let* ((x36 (car-safe val)) (x37 (cdr-safe val))) (progn (ignore (consp x37)) (let* ((x38 (car-safe x37)) (x39 (cdr-safe x37))) (progn (ignore (consp x39)) (let* ((x40 (car-safe x39)) (x41 (cdr-safe x39))) (progn (ignore (consp x41)) (let* ((x42 (car-safe x41)) (x43 (cdr-safe x41))) (progn (ignore (null x43)) (let ((types x36) (option x38) (value x40) (errors x42)) (progn (doom-print (doom-print--format (doom-print--style 'red "Error: %s received invalid value %S") (string-join (progn (or (progn (and (memq (type-of option) cl-struct-doom-cli-option-tags) t)) (signal 'wrong-type-argument (list 'doom-cli-option option))) (aref option 5)) "/") value)) (doom-print (doom-print--format (doom-print--style 'bold "\nValidation errors:"))) (let ((tail errors)) (while tail (let ((err (car tail))) (doom-print (doom-print--format (doom-print--class 'item "%s." (doom-print--class 'fill err)))) (setq tail (cdr tail))))))))))))))))) (doom-cli-call (cons ':help (cons "--postamble" (cdr (doom-cli--command context)))) context e) 5) (doom-cli-command-not-found-error (let* ((command (cdr e)) (cli (doom-cli-get command))) (cond ((null cli) (doom-print (doom-print--format (doom-print--style 'red "Error: unrecognized command '%s'") (doom-cli-command-string (or (cdr command) command)))) (doom-cli-call (cons ':help (cons "--similar" (cons "--postamble" (cdr command)))) context e)) ((null (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 9))) (doom-print (doom-print--format (doom-print--style 'red "Error: a subcommand is required"))) (doom-cli-call (cons ':help (cons "--subcommands" (cons "--postamble" (cdr command)))) context e)))) 4) (doom-cli-invalid-prefix-error (let ((prefix (car (cdr e)))) (doom-print (doom-print--format (doom-print--style 'red "Error: `run!' called with invalid prefix %S") prefix)) (let* ((suggested (and t (let* ((--cl-var-- t) --cl-var--) (catch '--cl-block---cl-finish---- (maphash #'(lambda (--cl-var-- cli) (or (if (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 2)) t (progn (setq --cl-var-- (car (progn (or (progn (and (memq (type-of cli) cl-struct-doom-cli-tags) t)) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 1)))) (setq --cl-var-- nil))) (throw '--cl-block---cl-finish---- nil))) doom-cli--table)) --cl-var--)))) (if suggested (doom-print (doom-print--format "Did you mean %S?" suggested)) (doom-print (doom-print--format "There are no commands defined under %S." prefix))))) 4) (user-error (doom-print (doom-print--format (doom-print--style 'red "Error: %s") (car (cdr e)))) (doom-print (doom-print--format "\nAborting...")) 3)) context)))) (fset #'message old)))))))) ((doom-context cli t))) ;;;; 41 ((run! "doom" ("up")) ((prefix . "doom") (args ("up")))) ;;;; 42 ((load-with-code-conversion "/home/fdr/.emacs.d/bin/doom" "/home/fdr/.emacs.d/bin/doom" nil t) ((load-in-progress . t) (inhibit-file-name-operation) (set-auto-coding-for-load . t) (load-file-name . "/home/fdr/.emacs.d/bin/doom") (load-true-file-name . "/home/fdr/.emacs.d/bin/doom") (read-symbol-shorthands) (eval-buffer-list #) (standard-output) (lexical-binding) (standard-input . #) (macroexp--dynvars) (current-load-list "/home/fdr/.emacs.d/bin/doom"))) ;;;; 43 ((command-line-1 ("--load" "/home/fdr/.emacs.d/bin/doom" "--" "up")) ((command-line-args-left "--" "up") (argi . "-load") (lexical-binding) (lread--unescaped-character-literals))) ;;;; 44 ((command-line) nil) ;;;; 45 ((normal-top-level) nil)