summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index a0f77610..a17517ac 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1,7 +1,17 @@
 ;;; init --- user init file  -*- lexical-binding: t; -*-
 (eval '(setq inhibit-startup-echo-area-message "alan"))
 (defvar default-file-name-handler-alist file-name-handler-alist)
-(setq file-name-handler-alist nil)
+(setq file-name-handler-alist nil
+      gc-cons-threshold most-positive-fixnum
+      gc-cons-percentage 0.6)
+(defun set-max-gc-cons ()
+  (setq gc-cons-threshold most-positive-fixnum))
+(defun set-default-gc-cons ()
+  (setq gc-cons-threshold (* 16 1024 1024)
+        gc-cons-percentage 0.1))
+(add-hook 'minibuffer-setup-hook #'set-max-gc-cons)
+(add-hook 'minibuffer-exit-hook #'set-default-gc-cons)
+(add-hook 'after-init-hook #'set-default-gc-cons)
 
 (defun restore-file-name-handler-alist ()
   (setq file-name-handler-alist default-file-name-handler-alist))