diff --git a/users/crumb/programs/emacs/init.el b/users/crumb/programs/emacs/init.el index 98a247b..5dbf6c6 100644 --- a/users/crumb/programs/emacs/init.el +++ b/users/crumb/programs/emacs/init.el @@ -16,6 +16,7 @@ (require 'syd-age) (require 'syd-autosave) (require 'syd-completion) +(require 'syd-custom) (require 'syd-display-startup-time) (require 'syd-evil) (require 'syd-keybinds) diff --git a/users/crumb/programs/emacs/lib/syd-constants.el b/users/crumb/programs/emacs/lib/syd-constants.el index 8e2180a..a84ea6e 100644 --- a/users/crumb/programs/emacs/lib/syd-constants.el +++ b/users/crumb/programs/emacs/lib/syd-constants.el @@ -3,11 +3,15 @@ (defvar syd-data-dir (or (getenv "EMACS_DATA_DIR") (error "Need $EMACS_DATA_DIR")) - "Directory analogous to XDG_DATA_HOME for miscellaneous Emacs things.") + "Directory analogous to XDG_DATA_HOME for miscellaneous Emacs things. Sydnix +will wipe this on boot!") (defvar syd-cache-dir (or (getenv "EMACS_CACHE_DIR") - (error "Need $EMACS_CACHE_DIR"))) + (error "Need $EMACS_CACHE_DIR")) + "Directory analogous to XDG_CACHE_HOME for miscellaneous Emacs things. Sydnix +will not usually wipe this on boot; /however/ it is still free to clear this +directory at any time.") (provide 'syd-constants) ;;; syd-constants.el ends here diff --git a/users/crumb/programs/emacs/modules/syd-custom.el b/users/crumb/programs/emacs/modules/syd-custom.el new file mode 100644 index 0000000..5c03f2c --- /dev/null +++ b/users/crumb/programs/emacs/modules/syd-custom.el @@ -0,0 +1,14 @@ +;;; syd-custom.el -*- lexical-binding: t; -*- + +;; To discourage use of the custom file, we store it somewhere will +;; Impermanence will wipe it. +(use-package emacs + ;; TODO: I'd like to allow /some/ custom variables. E.g., the trusted + ;; dir-locals files. See `hack-dir-local-variables'. It has some hooks that + ;; should make this accomplishable. + :custom (custom-file (file-name-concat syd-data-dir "custom.el")) + :config + (when (file-readable-p custom-file) + (load custom-file))) + +(provide 'syd-custom)