Autoload private module & add private init.el (#88)

This commit is contained in:
Henrik Lissner 2017-06-05 12:32:26 +02:00
parent e8a94535da
commit b82ace43ea
3 changed files with 32 additions and 5 deletions

View file

@ -286,11 +286,16 @@ byte-compilation."
(setq doom-modules ',doom-modules)
(unless noninteractive
(load "~/.emacs.local.el" t t)
,(let ((private-init (doom-module-path :private user-login-name "init")))
(when (file-exists-p (concat private-init ".el"))
`(load ,private-init t t)))
,@(let (forms)
(dolist (module (doom--module-pairs) (nreverse forms))
(push `(require! ,(car module) ,(cdr module) t) forms)))
(dolist (module (doom--module-pairs))
(push `(require! ,(car module) ,(cdr module) t) forms))
(unless (doom-module-loaded-p :private (intern user-login-name))
(push `(require! :private ,user-login-name t) forms))
(nreverse forms))
(when (display-graphic-p)
(require 'server)

View file

@ -110,7 +110,8 @@
twitter ; twitter client https://twitter.com/vnought
write ; emacs as a word processor (latex + org + markdown)
;; Private modules aren't tracked in source control (except for mine).
;; Use it as a reference for your own.
;; Private modules named after your username are loaded automatically.
;; Leaving this here is harmless though. Also, they are omitted from
;; source control (except for mine; use it as a reference).
:private hlissner)

View file

@ -0,0 +1,21 @@
;;; private/hlissner/init.el
;; This is a special file, unique to private modules, that is loaded after DOOM
;; core but before any module is activated, giving you an opportunity to
;; overwrite variables or settings before initialization.
;; host-specific settings
(load "~/.emacs.local.el" t t)
(setq user-mail-address "henrik@lissner.net"
user-full-name "Henrik Lissner")
(pcase system-name
("proteus"
(setq +doom-modeline-height 25
+doom-font (font-spec :family "Fira Mono" :size 10)
+doom-variable-pitch-font (font-spec :family "Fira Sans" :size 10)
+doom-unicode-font (font-spec :family "DejaVu Sans Mono" :size 10)
nlinum-format "%3d "))
("halimede"
(setq +doom-modeline-height 27)))