summaryrefslogtreecommitdiff
path: root/home/dots/.emacs.d/early-init.el
diff options
context:
space:
mode:
authorMarc Coquand <marc@coquand.email>2024-12-02 10:51:30 +0200
committerMarc Coquand <marc@coquand.email>2024-12-02 10:51:30 +0200
commit65084da57f2881cb2bc5de31657ce88f31a5fadb (patch)
tree768673082f069a95d9c6d684b0229a6319bc2ef2 /home/dots/.emacs.d/early-init.el
parentfa738a75d508a68db860dd748c819e760636da0f (diff)
downloadguix-65084da57f2881cb2bc5de31657ce88f31a5fadb.tar.gz
guix-65084da57f2881cb2bc5de31657ce88f31a5fadb.tar.bz2
guix-65084da57f2881cb2bc5de31657ce88f31a5fadb.zip
.
Diffstat (limited to '')
-rw-r--r--home/dots/.emacs.d/early-init.el71
1 files changed, 71 insertions, 0 deletions
diff --git a/home/dots/.emacs.d/early-init.el b/home/dots/.emacs.d/early-init.el
new file mode 100644
index 0000000..6da7839
--- /dev/null
+++ b/home/dots/.emacs.d/early-init.el
@@ -0,0 +1,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)