From b80d36f5a09490c789563638906cdeac115ff841 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 2 Jan 2021 15:35:47 -0600 Subject: Add back early-init.el There are a few functions that really speed up init when placed in early-init.el, so I put them back in there. Cf. doom-emacs’ early-init for details. --- config.org | 35 +++++++++++++++++------------------ early-init.el | 5 +++++ 2 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 early-init.el diff --git a/config.org b/config.org index eae8fe0..c444638 100644 --- a/config.org +++ b/config.org @@ -154,27 +154,15 @@ doesn't work, I'll call git directly and clone the repo myself. **** Tool bars and menu bars #+BEGIN_SRC emacs-lisp -(cuss default-frame-alist - '((tool-bar-lines . 0) - (menu-bar-lines .0)) - "Setup the default frame alist.") - -(menu-bar-mode -1) -(tool-bar-mode -1) + (menu-bar-mode -1) + (tool-bar-mode -1) #+END_SRC **** Scroll bars #+BEGIN_SRC emacs-lisp -(add-to-list 'default-frame-alist - '(vertical-scroll-bars . nil)) - -(scroll-bar-mode -1) - -(add-to-list 'default-frame-alist - '(horizontal-scroll-bars . nil)) - -(horizontal-scroll-bar-mode -1) + (scroll-bar-mode -1) + (horizontal-scroll-bar-mode -1) #+END_SRC *** Dialogs @@ -1299,8 +1287,6 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m :header-args: :tangle init.el :END: -I realized I didn’t need =early-init.el=, since it really only set =load-prefer-newer=. So I’ve set that here, and wrapped the actual loading of config in a =let*= form that speeds up init, and loads the newer of either =config.org= or =config.el=. - #+BEGIN_SRC emacs-lisp ;; init.el -*- lexical-binding: t -*- @@ -1320,6 +1306,19 @@ I realized I didn’t need =early-init.el=, since it really only set =load-prefe (org-babel-load-file conf-org))) #+END_SRC +*** early-init.el +:PROPERTIES: +:header-args: :tangle early-init.el +:END: + +#+BEGIN_SRC emacs-lisp + ;; I use `straight.el' instead of `package.el'. + (setq package-enable-at-startup nil) + + ;; Don't resize the frame when loading fonts + (setq frame-inhibit-implied-resize t) +#+end_src + ** Ease tangling and loading of Emacs' init #+BEGIN_SRC emacs-lisp diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..7c9c81c --- /dev/null +++ b/early-init.el @@ -0,0 +1,5 @@ +;; I use `straight.el' instead of `package.el'. +(setq package-enable-at-startup nil) + +;; Don't resize the frame when loading fonts +(setq frame-inhibit-implied-resize t) -- cgit 1.4.1-21-gabe81