-
Notifications
You must be signed in to change notification settings - Fork 0
/
early-init.el
72 lines (51 loc) · 2.27 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
;; -*- lexical-binding: t -*-
(defconst sys/win32p (eq system-type 'windows-nt)
"Are we running on a WinTel system?")
(defconst sys/linuxp (eq system-type 'gnu/linux)
"Are we running on a GNU/Linux system?")
(defconst sys/macp (eq system-type 'darwin)
"Are we running on a Mac system?")
(defconst sys/mac-ns-p (eq window-system 'ns)
"Are we running on a GNUstep or Macintosh Cocoa display?")
(defconst sys/mac-cocoa-p (featurep 'cocoa)
"Are we running with Cocoa on a Mac system?")
(defvar ymacs-dump-load-path nil)
(defvar ymacs-large-buffer-limit (* 3 1024 1024)
"When buffer's size bigger than `ymacs-large-buffer-limit', it
will close some features to speed up emacs performance")
(defconst ymacs-config-directory
(expand-file-name "lisp" user-emacs-directory)
"All configurations are in this directory")
(defvar ymacs-cache-direcotry
(expand-file-name ".cache" user-emacs-directory)
"All caches are in this direcotry")
(defconst ymacs-site-lisp-directory
(expand-file-name "site-lisp" user-emacs-directory)
"Local packages are in this directory")
(defconst ymacs-etc-direcotry
(expand-file-name "etc" user-emacs-directory)
"Some configuration files are in this directory")
(defconst ymacs-bin-direcotry
(expand-file-name "bin" user-emacs-directory)
"Some scripts are in this directory")
(defconst ymacs-autoloads-file (expand-file-name "autoloads.el" ymacs-cache-direcotry)
"Autoloads file")
;; Add `ymacs-config-directory' to `load-path'
(add-to-list 'load-path ymacs-config-directory)
;; Package initialize occurs automatically, before `user-init-file' is
;; loaded, but after `early-init-file'. We handle package
;; initialization, so we must prevent Emacs from doing it early!
(setq package-enable-at-startup nil)
;; Faster to disable these here (before they've been initialized)
;; Inhibit resizing frame
(setq frame-inhibit-implied-resize t)
(push '(menu-bar-lines . 0) default-frame-alist)
(push '(tool-bar-lines . 0) default-frame-alist)
(push '(vertical-scroll-bars . nil) default-frame-alist)
(unless sys/macp
(push '(undecorated . t) default-frame-alist))
;; disable native-compile during setup
;; (setq comp-deferred-compilation nil)
(setq load-prefer-newer t)
(unless (file-exists-p ymacs-cache-direcotry)
(make-directory ymacs-cache-direcotry))