aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-03-26 10:04:29 +0100
committerNicholas Rodrigues Lordello <[email protected]>2025-03-26 10:04:29 +0100
commit2a11d2649bcefe819636600e69a7e5972d48408d (patch)
tree16d352ba6abec4551137ef5845955ede5ef99f88 /config
parent0417bbd340d9f5f425afb20b52886c75cd15521d (diff)
Fix Configuration Loading
The previous commit introduced the concept of flavours to the init system, but was named wonkily. Also fix the custom.el loading to make sure it happens right at the end of the Sanemacs configuration, instead of somewhere in the middle. This allows for more consistent system-dependant customization.
Diffstat (limited to 'config')
-rw-r--r--config/emacs/flavours/development.el (renamed from config/emacs/config/development.el)0
-rw-r--r--config/emacs/flavours/macos.el (renamed from config/emacs/config/macos.el)0
-rw-r--r--config/emacs/init.el10
-rw-r--r--config/emacs/sanemacs.el12
4 files changed, 11 insertions, 11 deletions
diff --git a/config/emacs/config/development.el b/config/emacs/flavours/development.el
index 2ef26ee..2ef26ee 100644
--- a/config/emacs/config/development.el
+++ b/config/emacs/flavours/development.el
diff --git a/config/emacs/config/macos.el b/config/emacs/flavours/macos.el
index 463eec1..463eec1 100644
--- a/config/emacs/config/macos.el
+++ b/config/emacs/flavours/macos.el
diff --git a/config/emacs/init.el b/config/emacs/init.el
index e6ca9c3..29f3a20 100644
--- a/config/emacs/init.el
+++ b/config/emacs/init.el
@@ -8,8 +8,8 @@
(load "~/.config/emacs/sanemacs.el" nil t)
-(defcustom system-category 'plain
- "The category of system.
+(defcustom system-flavour 'plain
+ "The flavour of system.
Allows initialization and customization differentiation with a
shared .emacs."
@@ -17,7 +17,7 @@
(const :tag "Development" development))
:group 'convenience)
-(when (eq system-category 'development)
- (load "~/.config/emacs/config/development.el" nil t))
+(when (eq system-flavour 'development)
+ (load "~/.config/emacs/flavours/development.el" nil t))
(when (eq system-type 'darwin)
- (load "~/.config/emacs/config/macos.el" nil t))
+ (load "~/.config/emacs/flavours/macos.el" nil t))
diff --git a/config/emacs/sanemacs.el b/config/emacs/sanemacs.el
index d8df3d4..4a9529d 100644
--- a/config/emacs/sanemacs.el
+++ b/config/emacs/sanemacs.el
@@ -35,12 +35,6 @@
(with-eval-after-load 'tramp-cache
(setq tramp-persistency-file-name "~/.cache/emacs/tramp"))
-;; Use separate file for custom variables
-(setq custom-file "~/.cache/emacs/custom.el")
-(unless (file-exists-p custom-file)
- (write-region "" nil custom-file))
-(load custom-file nil t)
-
;; Configure package management
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
@@ -61,3 +55,9 @@
(undo-tree-auto-save-history nil)
:config
(global-undo-tree-mode +1))
+
+;; Use separate file for custom variables
+(setq custom-file "~/.cache/emacs/custom.el")
+(unless (file-exists-p custom-file)
+ (write-region "" nil custom-file))
+(load custom-file nil t)