blob: 6da7839976d31c340c84731969b56fbfd7e3b3c6 (
plain)
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
|
;;; early-init.el --- Early Init -*- no-byte-compile: t; lexical-binding: t; -*-
(defconst my/start-time (current-time))
(defvar file-name-handler-alist-old file-name-handler-alist)
(setq file-name-handler-alist nil
message-log-max 16384
gc-cons-threshold most-positive-fixnum ;; Defer Garbage collection
gc-cons-percentage 1.0)
(add-hook 'emacs-startup-hook
(lambda ()
(setq file-name-handler-alist file-name-handler-alist-old)
(garbage-collect)
(message "Load time %.06f"
(float-time (time-since
my/start-time)))) t)
(menu-bar-mode -1)
(tool-bar-mode -1)
(show-paren-mode 1)
(global-font-lock-mode t)
(winner-mode t)
(set-language-environment "UTF-8")
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(setq load-prefer-newer t)
(setq inhibit-compacting-font-caches t)
(setq inhibit-startup-screen t
inhibit-startup-echo-area-message user-login-name)
(setq initial-buffer-choice nil
inhibit-startup-buffer-menu t
inhibit-x-resources t)
;; Disable bidirectional text scanning for a modest performance boost.
(setq-default bidi-display-reordering 'left-to-right
bidi-paragraph-direction 'left-to-right)
;; Give up some bidirectional functionality for slightly faster re-display.
(setq bidi-inhibit-bpa t)
(advice-add #'display-startup-echo-area-message :override #'ignore)
(advice-add #'display-startup-screen :override #'ignore)
(setq initial-major-mode 'fundamental-mode
initial-scratch-message nil)
(if (and (featurep 'native-compile)
(fboundp 'native-comp-available-p)
(native-comp-available-p))
;; Activate `native-compile'
(setq native-comp-jit-compilation t
native-comp-deferred-compilation t ; Obsolete since Emacs 29.1
package-native-compile t)
;; Deactivate the `native-compile' feature if it is not available
(setq features (delq 'native-compile features)))
(setq native-comp-async-report-warnings-errors
'silent)
(setq inhibit-splash-screen t)
(setq auto-mode-case-fold nil)
(setq default-input-method nil)
(setq use-package-enable-imenu-support t)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("non-gnu" . "https://elpa.nongnu.org/nongnu/")))
(provide 'early-init)
|