feat: Keep eln-cache out of my config directory.
For early-init reasons, we had to split part of syd-prelude.el out into a new file, syd-constants.el.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
;;; early-init.el -*- lexical-binding: t; -*-
|
;;; early-init.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(add-to-list 'load-path (file-name-concat user-emacs-directory "lib"))
|
||||||
|
(require 'syd-constants)
|
||||||
|
|
||||||
;; Disable package.el; we use Straight.
|
;; Disable package.el; we use Straight.
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
@@ -9,3 +12,7 @@
|
|||||||
(setq gc-cons-threshold
|
(setq gc-cons-threshold
|
||||||
;; (4 gibibytes)
|
;; (4 gibibytes)
|
||||||
(* 4 (expt 1024 3)))
|
(* 4 (expt 1024 3)))
|
||||||
|
|
||||||
|
;; By default, Emacs will cache compilation artifacts in my personal config
|
||||||
|
;; directory — I'm not keen on that! Redirect it to a dedicated cache directory.
|
||||||
|
(startup-redirect-eln-cache (file-name-concat syd-cache-dir "eln-cache"))
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
;; Personal modules.
|
;; Personal modules.
|
||||||
|
|
||||||
(add-to-list 'load-path (file-name-concat user-emacs-directory "modules"))
|
(add-to-list 'load-path (file-name-concat user-emacs-directory "modules"))
|
||||||
(add-to-list 'load-path (file-name-concat user-emacs-directory "lib"))
|
|
||||||
|
;; Must come before the rest!
|
||||||
|
(require 'syd-use-package)
|
||||||
|
|
||||||
(require 'syd-age)
|
(require 'syd-age)
|
||||||
(require 'syd-autosave)
|
(require 'syd-autosave)
|
||||||
|
|||||||
13
users/crumb/programs/emacs/lib/syd-constants.el
Normal file
13
users/crumb/programs/emacs/lib/syd-constants.el
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
;;; syd-constants.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(defvar syd-data-dir
|
||||||
|
(or (getenv "EMACS_DATA_DIR")
|
||||||
|
(error "Need $EMACS_DATA_DIR"))
|
||||||
|
"Directory analogous to XDG_DATA_HOME for miscellaneous Emacs things.")
|
||||||
|
|
||||||
|
(defvar syd-cache-dir
|
||||||
|
(or (getenv "EMACS_CACHE_DIR")
|
||||||
|
(error "Need $EMACS_CACHE_DIR")))
|
||||||
|
|
||||||
|
(provide 'syd-constants)
|
||||||
|
;;; syd-constants.el ends here
|
||||||
@@ -2,14 +2,7 @@
|
|||||||
|
|
||||||
(eval-when-compile (require 'cl-lib))
|
(eval-when-compile (require 'cl-lib))
|
||||||
|
|
||||||
(defvar syd-data-dir
|
(require 'syd-constants)
|
||||||
(or (getenv "EMACS_DATA_DIR")
|
|
||||||
(error "Need $EMACS_DATA_DIR"))
|
|
||||||
"Directory analogous to XDG_DATA_HOME for miscellaneous Emacs things.")
|
|
||||||
|
|
||||||
(defvar syd-cache-dir
|
|
||||||
(or (getenv "EMACS_CACHE_DIR")
|
|
||||||
(error "Need $EMACS_CACHE_DIR")))
|
|
||||||
|
|
||||||
(cl-defmacro syd-define-stub
|
(cl-defmacro syd-define-stub
|
||||||
(name &key (desc "implement me!") interactive)
|
(name &key (desc "implement me!") interactive)
|
||||||
|
|||||||
Reference in New Issue
Block a user