summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--user/emacs/early-init.el14
-rw-r--r--user/emacs/init.el13
-rw-r--r--user/settings/emacs.nix6
3 files changed, 20 insertions, 13 deletions
diff --git a/user/emacs/early-init.el b/user/emacs/early-init.el
new file mode 100644
index 00000000..7d591550
--- /dev/null
+++ b/user/emacs/early-init.el
@@ -0,0 +1,14 @@
+(setq inhibit-startup-screen t
+      initial-scratch-message ""
+      initial-major-mode 'fundamental-mode
+      package-enable-at-startup nil
+      frame-inhibit-implied-resize t)
+
+;; Disable all the bars, unless on OSX, in which case, keep the menu bar.
+(unless (eq system-type 'darwin)
+  (menu-bar-mode -1))
+(scroll-bar-mode -1)
+(tool-bar-mode -1)
+(set-fringe-mode '(4 . 4))
+
+(defvar evil-want-keybinding nil)
diff --git a/user/emacs/init.el b/user/emacs/init.el
index d5396f75..053cecb4 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1,12 +1,5 @@
 ;;; init --- user init file  -*- lexical-binding: t; -*-
 (setq inhibit-startup-echo-area-message "alan")
-(setq inhibit-startup-screen t
-      initial-scratch-message ""
-      initial-major-mode 'fundamental-mode
-      package-enable-at-startup nil
-      evil-want-keybinding nil
-      frame-inhibit-implied-resize t)
-
 (let ((default-gc-cons-threshold (* 16 1024 1024))
       (default-file-name-handler-alist file-name-handler-alist))
   (setq gc-cons-threshold most-positive-fixnum
@@ -60,12 +53,6 @@
 
 ;; I prefer an always-visible cursor.  Feels less distracting.
 (blink-cursor-mode -1)
-;; Disable all the bars, unless on OSX, in which case, keep the menu bar.
-(unless (eq system-type 'darwin)
-  (menu-bar-mode -1))
-(scroll-bar-mode -1)
-(tool-bar-mode -1)
-(set-fringe-mode '(4 . 4))
 
 ;; Ring the bell sometimes, but not so often
 (setq ring-bell-function
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index 1ce4fc23..3d353bcc 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -189,6 +189,12 @@ in
   home.sessionVariables = {
     EDITOR = "${editorScript}/bin/edit";
   };
+  xdg.configFile."emacs/early-init.el" = {
+    source = ../emacs/early-init.el;
+    onChange = ''
+      ${config.programs.emacs.finalPackage}/bin/emacs -Q -batch -f batch-byte-compile .config/emacs/early-init.el
+      '';
+  };
   xdg.configFile."emacs/init.el" = {
     source = ../emacs/init.el;
     onChange = ''