refactor: reformat doom.el and use doom-lib

Move startup optimizations after core globals, so we can employ
doom-lib's API.
This commit is contained in:
Henrik Lissner 2022-09-14 17:57:03 +02:00
parent 7a2be67efa
commit 18cd2eb483
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 203 additions and 227 deletions

View file

@ -2,6 +2,20 @@
;;; Commentary:
;;; Code:
;;; Custom error types
(define-error 'doom-error "An unexpected Doom error")
(define-error 'doom-core-error "Unexpected error in Doom's core" 'doom-error)
(define-error 'doom-hook-error "Error in a Doom startup hook" 'doom-error)
(define-error 'doom-autoload-error "Error in Doom's autoloads file" 'doom-error)
(define-error 'doom-user-error "Error caused by user's config or system" 'doom-error)
(define-error 'doom-module-error "Error in a Doom module" 'doom-error)
(define-error 'doom-package-error "Error with packages" 'doom-error)
(define-error 'doom-profile-error "Error while processing profiles" 'doom-error)
;;
;;; Logging
(defmacro doom-log (output &rest args)
"Log a message in *Messages*.