doomemacs/modules/config/private/init.el
Henrik Lissner a967aa051a
Force autoloads to use absolute paths
Autoload paths used to be relative to arbitrary roots (usually
doom-modules-dir). This commit changes doom//reload-autoloads to iterate
over autoloads in doom-autoloads-file and replace their file paths with
an absolute one.

Theoretically this should make Emacs feel marginally faster, but we
*probably* get more of a benefit from a shorter load-path (because we no
longer need doom-modules-dirs, doom-core-dir or doom-psuedo-module-paths
in the load-path).

This is highly experimental however!
2018-02-19 01:25:37 -05:00

19 lines
658 B
EmacsLisp

;;; config/private/init.el -*- lexical-binding: t; -*-
(defvar +private-config-path
(if (featurep! +xdg)
(expand-file-name "doom/" (or (getenv "XDG_CONFIG_HOME") "~/.config"))
"~/.doom.d")
"The directory that serves as the root of your external private config for
Doom Emacs.")
(when (file-directory-p +private-config-path)
;; Ensure `doom//reload-autoloads', `doom//byte-compile' and
;; `doom-initialize-packages' will treat `+private-config-path' as the root of
;; this module.
(add-to-list 'doom-psuedo-module-dirs +private-config-path)
;;
(load (expand-file-name "init.el" +private-config-path)
:noerror :nomessage))