diff --git a/core/core-modules.el b/core/core-modules.el index a88a9dfdd..427001fb6 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -119,8 +119,7 @@ non-nil." (unless no-config-p (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) - (load! "config" doom-private-dir t) - (load custom-file 'noerror (not doom-debug-mode)))))) + (load! "config" doom-private-dir t))))) ;; diff --git a/core/core.el b/core/core.el index 1f31be6ee..1b7a5e7e9 100644 --- a/core/core.el +++ b/core/core.el @@ -233,7 +233,7 @@ users).") (setq abbrev-file-name (concat doom-local-dir "abbrev.el") async-byte-compile-log-file (concat doom-etc-dir "async-bytecomp.log") bookmark-default-file (concat doom-etc-dir "bookmarks") - custom-file (concat doom-local-dir "custom.el") + custom-file (concat doom-private-dir "config.el") custom-theme-directory (concat doom-private-dir "themes/") desktop-dirname (concat doom-etc-dir "desktop") desktop-base-file-name "autosave" @@ -253,6 +253,14 @@ users).") :override #'emacs-session-filename (concat doom-cache-dir "emacs-session." session-id)) +(defadvice! doom--save-enabled-commands-to-doomdir-a (orig-fn &rest args) + "When enabling a disabled command, the `put' call is written to +~/.emacs.d/init.el, which causes issues for Doom, so write it to the user's +config.el instead." + :around #'en/disable-command + (let ((user-init-file custom-file)) + (apply orig-fn args))) + ;; ;;; Optimizations