New // naming convention + refactor doom management functions

This commit is contained in:
Henrik Lissner 2017-11-05 01:23:36 +01:00
parent 43a9acec28
commit 95a5b46dc5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 170 additions and 169 deletions

View file

@ -303,7 +303,7 @@ package.el as appropriate."
;;
;;;###autoload
(defun doom/packages-install ()
(defun doom//packages-install ()
"Interactive command for installing missing packages."
(interactive)
(let ((packages (doom-get-missing-packages)))
@ -341,10 +341,10 @@ package.el as appropriate."
"")))))
(message! (bold (green "Finished!")))
(doom/reload-load-path))))
(doom//reload-load-path))))
;;;###autoload
(defun doom/packages-update ()
(defun doom//packages-update ()
"Interactive command for updating packages."
(interactive)
(doom-refresh-packages doom-debug-mode)
@ -382,10 +382,10 @@ package.el as appropriate."
(if result "DONE" "FAILED"))))))
(message! (bold (green "Finished!")))
(doom/reload-load-path)))))
(doom//reload-load-path)))))
;;;###autoload
(defun doom/packages-autoremove ()
(defun doom//packages-autoremove ()
"Interactive command for auto-removing orphaned packages."
(interactive)
(let ((packages (doom-get-orphaned-packages)))
@ -415,7 +415,7 @@ package.el as appropriate."
pkg)))))
(message! (bold (green "Finished!")))
(doom/reload-load-path)))))
(doom//reload-load-path)))))
;;;###autoload
(defalias 'doom/install-package #'package-install)

View file

@ -1,7 +1,7 @@
;;; core/autoload/test.el -*- lexical-binding: t; -*-
;;; core/autoload/test.el -*- lexical-binding: t; no-byte-compile: t; -*-
;;;###autoload
(defun doom-run-tests (&optional modules)
(defun doom//run-tests (&optional modules)
"Run all loaded tests, specified by MODULES (a list of module cons cells) or
command line args following a double dash (each arg should be in the
'module/submodule' format).

View file

@ -68,17 +68,6 @@ window changes before then, the undo expires."
(delete-frame))
(save-buffers-kill-emacs)))
;;;###autoload
(defun doom/reload-theme ()
"Reset the color theme currently in use."
(interactive)
(let ((theme (or (car-safe custom-enabled-themes) doom-theme)))
(when theme
(mapc #'disable-theme custom-enabled-themes))
(run-hooks 'doom-pre-reload-theme-hook)
(doom|init-ui)
(run-hooks 'doom-post-reload-theme-hook)))
;;;###autoload
(define-minor-mode doom-big-font-mode
"A global mode that resizes the font, for streams, screen-sharing and
@ -91,3 +80,14 @@ presentations."
(if doom-big-font-mode
(set-frame-font doom-big-font t t)
(set-frame-font doom-font t t)))
;;;###autoload
(defun doom//reload-theme ()
"Reset the color theme currently in use."
(interactive)
(let ((theme (or (car-safe custom-enabled-themes) doom-theme)))
(when theme
(mapc #'disable-theme custom-enabled-themes))
(run-hooks 'doom-pre-reload-theme-hook)
(doom|init-ui)
(run-hooks 'doom-post-reload-theme-hook)))