doomemacs/core/autoload/cli.el
Henrik Lissner d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00

46 lines
1014 B
EmacsLisp

;;; core/autoload/cli.el -*- lexical-binding: t; -*-
(require 'core-cli)
(defun doom--run (command &optional yes)
(let ((default-directory doom-emacs-dir)
(doom-auto-accept yes))
(let ((compilation-buffer-name-function (lambda (_) "*bin/doom*")))
(compile (format "bin/doom %s" command) t))
(while compilation-in-progress
(sit-for 1))
(when (y-or-n-p "Reload Doom config?")
(doom/reload))
(message "Done")))
;;;###autoload
(defun doom//update (&optional yes)
"TODO"
(interactive "P")
(doom--run "update" yes))
;;;###autoload
(defun doom//upgrade (&optional yes)
"TODO"
(interactive "P")
(doom--run "upgrade" yes))
;;;###autoload
(defun doom//install (&optional yes)
"TODO"
(interactive "P")
(doom--run "install" yes))
;;;###autoload
(defun doom//autoremove (&optional yes)
"TODO"
(interactive "P")
(doom--run "autoremove" yes))
;;;###autoload
(defun doom//refresh (&optional yes)
"TODO"
(interactive "P")
(doom--run "refresh" yes))