emacs/early-init.el

54 lines
1.7 KiB
EmacsLisp
Raw Normal View History

2022-06-19 19:05:40 -08:00
;;; Early-init --- do all these things early in the init process
;;; Commentary:
;; do the first initial beginning things
;;; Code:
;; blame @chke@emacs.ch if this no worky
(defvar mir/default-gc-thresh gc-cons-threshold)
(defun max-gc-thresh ()
(setq gc-cons-threshold most-positive-fixnum))
;; (max-gc-thresh)
(defun restore-gc-thresh ()
(setq gc-cons-threshold mir/default-gc-thresh))
;(add-hook 'minibuffer-setup-hook #'max-gc-thresh)
;(add-hook 'minibuffer-exit-hook #'restore-gc-thresh)
;(add-hook 'elpaca-after-init-hook #'restore-gc-thresh)
;;; (setq gc-cons-percentage 0.5)
;; (run-with-idle-timer 5 t #'garbage-collect)
;(setq garbage-collection-messages t)
2022-06-19 19:05:40 -08:00
(defun display-startup-echo-area-message ()
"A re-definition of the function.
Tell the Emacs startup time and number of garbage-collections
instead of the banal
\"For information about GNU Emacs and the GNU system, type \\[about-emacs].\""
2024-01-24 09:55:43 -09:00
(message "%s, gc ran %s times" (emacs-init-time) gcs-done))
2022-06-19 19:05:40 -08:00
(setq initial-scratch-message (purecopy "\
;; Write some lisp in this buffer and it can be executed, either with
;; \\[eval-last-sexp] locally or \\[eval-buffer] globally.
"))
;; Disable package.el so we can use straight
(setq package-enable-at-startup nil)
(defvar use-package-verbose nil)
(defvar straight-fix-flycheck t)
2022-06-19 19:05:40 -08:00
;; Hide default dashboard
(defvar inhibit-startup-messages t)
(setq inhibit-startup-screen t)
;; Don't pop up error window on native-comp emacs
(defvar native-comp-async-report-warnings-errors 'silent)
;; disable TRAMP because no
(defvar tramp-mode nil)
2022-06-19 19:05:40 -08:00
;; Run stuff after opening a new frame
;; (setq server-after-make-frame-hook (mitch/graphical-setup))
;; (setq before-make-frame-hook (mitch/graphical-setup))
;;; early-init.el ends here