-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathearly-init.el
84 lines (64 loc) · 2.68 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;;; early-init.el --- Emacs early init -*- lexical-binding: t -*-
;;
;; Copyright (c) 2022 mattiasdrp and contributors.
;; Author: mattiasdrp
;; Maintainer: mattiasdrp <https://github.com/mattiasdrp>
;; Created: 17 august 2022
;; Version: 1.0
;; Licence: MIT
;; Keywords: emacs, init, convenience, configuration
;; URL: https://github.com/mattiasdrp/pokemacs
;;; Commentary:
;; This file is an early-init file for Emacs. It will be executed before
;; init.el when emacs is loaded.
;; This file IS NOT intended to be edited! It was generated by early-init.org.
;; If you want to change it, edit early-init.org then M-x org-babel-tangle
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code:
(setq gc-cons-threshold most-positive-fixnum)
(setq read-process-output-max (* 1024 1024)) ;; 1mb
;;; Native compilation settings
(when (featurep 'native-compile)
;; Silence compiler warnings as they can be pretty disruptive
(setq native-comp-async-report-warnings-errors nil)
;; Make native compilation happens asynchronously
(setq native-comp-deferred-compilation t)
;; Set the right directory to store the native compilation cache
;; NOTE: the method for setting the eln-cache directory depends on the emacs version
(when (fboundp 'startup-redirect-eln-cache)
(if (version< emacs-version "29")
(add-to-list 'native-comp-eln-load-path (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory)))
(startup-redirect-eln-cache (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory))))))
(setq package-enable-at-startup nil)
(setq-default inhibit-redisplay t
inhibit-message t)
(add-hook 'window-setup-hook
(lambda ()
(setq-default inhibit-redisplay nil
inhibit-message nil)
(redisplay)))
(defvar file-name-handler-alist-original file-name-handler-alist)
(setq file-name-handler-alist nil)
(setq site-run-file nil)
(setq default-frame-alist
'(
;; (min-height . 1) '(height . 45)
;; (min-width . 1) '(width . 81)
;; (vertical-scroll-bars)
(internal-border-width . 0)
(left-fringe . 8)
(right-fringe . 8)
(tool-bar-lines . 0)
(menu-bar-lines . 0)))
(when (fboundp 'tool-bar-mode)
(tool-bar-mode -1))
(when (fboundp 'menu-bar-mode)
(menu-bar-mode -1))
(when (fboundp 'scroll-bar-mode)
(scroll-bar-mode -1))
;; Default frame settings
(setq initial-frame-alist default-frame-alist)
(customize-set-variable 'initial-major-mode 'fundamental-mode)
(provide 'early-init)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; early-init.el ends here