-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathearly-init.el
37 lines (30 loc) · 1.3 KB
/
early-init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
;;; early-init.el --- -*- lexical-binding: t -*-
;; Author: Ian Y.E. Pan
;;; Commentary:
;;; Code:
(menu-bar-mode -1)
(unless (and (display-graphic-p) (eq system-type 'darwin))
(push '(menu-bar-lines . 0) default-frame-alist))
(push '(tool-bar-lines . 0) default-frame-alist)
(push '(vertical-scroll-bars) default-frame-alist)
(defvar file-name-handler-alist-original file-name-handler-alist)
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6
file-name-handler-alist nil
site-run-file nil
read-process-output-max (* 10 1024 1024)
bidi-inhibit-bpa t)
(defvar ian/gc-cons-threshold (* 100 1024 1024))
(add-hook 'emacs-startup-hook ; hook run after loading init files
#'(lambda ()
(setq gc-cons-threshold ian/gc-cons-threshold
gc-cons-percentage 0.1
file-name-handler-alist file-name-handler-alist-original)))
(add-hook 'minibuffer-setup-hook #'(lambda ()
(setq gc-cons-threshold most-positive-fixnum)))
(add-hook 'minibuffer-exit-hook #'(lambda ()
(garbage-collect)
(setq gc-cons-threshold ian/gc-cons-threshold)))
(setq package-enable-at-startup nil)
(provide 'early-init)
;;; early-init.el ends here