General cleanup + refactor; revise docstrings

This commit is contained in:
Henrik Lissner 2017-06-05 16:45:19 +02:00
parent baad7953bf
commit d62f446dc3
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 19 additions and 16 deletions

View file

@ -23,12 +23,12 @@
;; byte-compile). Not having to initialize package.el (or check that your ;; byte-compile). Not having to initialize package.el (or check that your
;; packages are installed) every time you start up Emacs affords us precious ;; packages are installed) every time you start up Emacs affords us precious
;; seconds. ;; seconds.
;; 5. Simplicity: No Cask, no external dependencies (unless you count make). ;; 5. Simplicity: No Cask, no external dependencies (unless you count make),
;; Arguably, this means my config is overcomplicated, but shhh, it's alright. ;; just Emacs. Arguably, my config is still over-complicated, but shhh, it's
;; Everything is fine. ;; fine. Everything is fine.
;; ;;
;; Technically, package.el commands should still work. To be absolutely sure, ;; You should be able to use package.el commands without any conflicts, but to
;; use the doom alternatives: ;; be absolutely certain use the doom alternatives:
;; ;;
;; + `package-install': `doom/install-package' ;; + `package-install': `doom/install-package'
;; + `package-reinstall': `doom/reinstall-package' ;; + `package-reinstall': `doom/reinstall-package'
@ -91,12 +91,12 @@ base by `doom!' and for calculating how many packages exist.")
use-package-always-defer t use-package-always-defer t
use-package-always-ensure nil use-package-always-ensure nil
use-package-expand-minimally (not doom-debug-mode) use-package-expand-minimally (eval-when-compile (not doom-debug-mode))
use-package-debug nil use-package-debug nil
use-package-verbose doom-debug-mode use-package-verbose doom-debug-mode
use-package-minimum-reported-time (if doom-debug-mode 0 0.1) use-package-minimum-reported-time (if doom-debug-mode 0 0.1)
;; Don't use MELPA, we'll use package.el for those ;; Don't track MELPA, we'll use package.el for that
quelpa-checkout-melpa-p nil quelpa-checkout-melpa-p nil
quelpa-update-melpa-p nil quelpa-update-melpa-p nil
quelpa-melpa-recipe-stores nil quelpa-melpa-recipe-stores nil
@ -165,10 +165,12 @@ to speed up startup."
(quiet! (doom/reload-autoloads)))) (quiet! (doom/reload-autoloads))))
(defun doom-initialize-packages (&optional force-p load-p) (defun doom-initialize-packages (&optional force-p load-p)
"Crawls across your emacs.d in order to fill `doom-modules' (from init.el) and "Crawls across your emacs.d to fill `doom-modules' (from init.el) and
`doom-packages' (from packages.el files), if they aren't set already. If FORCE-P `doom-packages' (from packages.el files), if they aren't set already.
is non-nil, do it even if they are. Also aggressively loads all core autoload
files." If FORCE-P is non-nil, do it even if they are.
This aggressively reloads core autoload files."
(doom-initialize force-p) (doom-initialize force-p)
(let ((noninteractive t) (let ((noninteractive t)
(load-fn (load-fn
@ -223,8 +225,6 @@ files."
(setq module (substring (symbol-name module) 1))) (setq module (substring (symbol-name module) 1)))
(when (symbolp submodule) (when (symbolp submodule)
(setq submodule (symbol-name submodule))) (setq submodule (symbol-name submodule)))
(cl-assert (stringp module))
(cl-assert (stringp submodule))
(expand-file-name (concat module "/" submodule "/" file) (expand-file-name (concat module "/" submodule "/" file)
doom-modules-dir)) doom-modules-dir))
@ -264,7 +264,7 @@ Used by `require!' and `depends-on!'."
(message "Loaded %s packages in %.03fs" (message "Loaded %s packages in %.03fs"
;; Certainly imprecise, especially where custom additions to ;; Certainly imprecise, especially where custom additions to
;; load-path are concerned, but I don't mind a [small] margin of ;; load-path are concerned, but I don't mind a [small] margin of
;; error in the plugin count. ;; error in the plugin count in exchange for faster startup.
(- (length load-path) (length doom--base-load-path)) (- (length load-path) (length doom--base-load-path))
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time))))) (setq doom-init-time (float-time (time-subtract after-init-time before-init-time)))))

View file

@ -1,5 +1,8 @@
;;; private/hlissner/autoload/hlissner.el ;;; private/hlissner/autoload/hlissner.el
(defvar +file-templates-dir)
(defvar +hlissner-snippets-dir)
;;;###autoload ;;;###autoload
(defun +hlissner/install-snippets () (defun +hlissner/install-snippets ()
"Install my snippets from https://github.com/hlissner/emacs-snippets into "Install my snippets from https://github.com/hlissner/emacs-snippets into

View file

@ -5,7 +5,7 @@
(load! +commands)) ; my custom ex commands (load! +commands)) ; my custom ex commands
(defvar +hlissner-dir (defvar +hlissner-dir
(eval-when-compile (file-name-directory load-file-name))) (file-name-directory load-file-name))
(defvar +hlissner-snippets-dir (defvar +hlissner-snippets-dir
(expand-file-name "snippets/" +hlissner-dir)) (expand-file-name "snippets/" +hlissner-dir))

View file

@ -10,7 +10,7 @@
(setq user-mail-address "henrik@lissner.net" (setq user-mail-address "henrik@lissner.net"
user-full-name "Henrik Lissner") user-full-name "Henrik Lissner")
(pcase system-name (pcase (system-name)
("proteus" ("proteus"
(setq +doom-modeline-height 25 (setq +doom-modeline-height 25
+doom-font (font-spec :family "Fira Mono" :size 10) +doom-font (font-spec :family "Fira Mono" :size 10)