summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2020-03-02 15:45:13 +0100
committerAlan Pearce2020-03-02 15:45:13 +0100
commit9e2bdbdb55b5311308250327f812d15c75ffe50c (patch)
tree2873651a7be77be40ba951c84652bb03418696de /user/emacs
parenta6c3b48a7bac0b52778a39d95f04a5f6d3ac84ba (diff)
downloadnixfiles-9e2bdbdb55b5311308250327f812d15c75ffe50c.tar.lz
nixfiles-9e2bdbdb55b5311308250327f812d15c75ffe50c.tar.zst
nixfiles-9e2bdbdb55b5311308250327f812d15c75ffe50c.zip
Emacs: optimise file loading at startup
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/.emacs.d/init.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/user/emacs/.emacs.d/init.el b/user/emacs/.emacs.d/init.el
index b511e907..1088e84c 100644
--- a/user/emacs/.emacs.d/init.el
+++ b/user/emacs/.emacs.d/init.el
@@ -7,11 +7,14 @@
       evil-want-keybinding nil
       frame-inhibit-implied-resize t)
 
-(let ((default-gc-cons-threshold (* 16 1024 1024)))
+(let ((default-gc-cons-threshold (* 16 1024 1024))
+      (default-file-name-handler-alist file-name-handler-alist))
   (setq gc-cons-threshold most-positive-fixnum
-        gc-cons-percentage 0.6)
+        gc-cons-percentage 0.6
+        file-name-handler-alist nil)
   (add-hook 'minibuffer-setup-hook (lambda () (setq gc-cons-threshold most-positive-fixnum)))
   (add-hook 'minibuffer-exit-hook (lambda () (setq gc-cons-threshold default-gc-cons-threshold)))
+  (add-hook 'emacs-startup-hook (lambda () (setq file-name-handler-alist default-file-name-handler-alist)))
   (add-hook 'after-init-hook (lambda ()
                                (setq gc-cons-threshold default-gc-cons-threshold
                                      gc-cons-percentage 0.1))))