1 Star 1 Fork 0

尧月/cabins-emacs.d

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
early-init.el 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
Jack 提交于 2024-02-18 11:01 . * change rust
;;; early-init.el --- Emacs 27 introduces early-init.el, which runs before init.el
;;; Commentary:
;; Runs before package and UI initializetion happens.
;;; Code:
(unless (>= emacs-major-version 28)
(error "ONLY EMACS v28+ IS SUPPORTED!"))
;; For speed up the startup, please do NOT forget reset it to default
;; after Emacs after-init-hook, or it may cause freezes.
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold 800000)))
;; Prevent unwanted runtime compilation for native-comp users
(setq inhibit-automatic-native-compilation t)
;; Package initialize occurs automatically, before `user-init-file' is loaded
;; but after `early-init-file'. If you want to handle package initialization,
;; you can prevent Emacs from doing it early by uncomment next line!
(setq package-enable-at-startup nil)
;; [From DOOM Emacs]
;; In noninteractive sessions, prioritize non-byte-compiled source files to
;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time
;; to skip the mtime checks on every *.elc file.
(setq load-prefer-newer noninteractive)
;; Do not resize the frame at this early stage.
(setq frame-inhibit-implied-resize t)
;; Clean GUI
(push '(scroll-bar-mode . nil) default-frame-alist)
(push '(tool-bar-mode . nil) default-frame-alist)
(push '(menu-bar-mode . nil) default-frame-alist)
;; System default coding
(set-language-environment 'utf-8)
;;(global-hl-line-mode 1)
;;(add-to-list 'custom-theme-load-path "~/.emacs.d/modules/themes/")
;;(load-theme 'fantom t)
(load-theme 'misterioso t)
;;(load-theme 'tango-dark t)
;;; early-init.el ends here
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; END:
;; start time
(add-hook 'emacs-startup-hook
(lambda ()
(message "Emacs ready in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done)))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yaoyue126/cabins-emacs.d.git
git@gitee.com:yaoyue126/cabins-emacs.d.git
yaoyue126
cabins-emacs.d
cabins-emacs.d
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385