dotfiles/.config/emacs/init.el

35 lines
978 B
EmacsLisp
Raw Normal View History

;;; init.el --- Emacs main initialization file -*- lexical-binding: t; -*-
;; Copyright (C) 2020-2021 earnest ma
;; SPDX-License-Identifier: MIT
;; Author: earnest ma <me@earne.link>
;;; Commentary:
;; Other than `early-init.el', this file is first looked at when Emacs is first
;; started. It only checks if the Emacs version is too low and the loads the
;; core/main.el file.
;;; Code:
(defvar earnemacs-minimum-emacs-version "27.1"
"Minimum Emacs version for earnemacs functionality.")
;; Error if Emacs version is not supported
(if (version< emacs-version earnemacs-minimum-emacs-version)
(error (concat "[earnemacs] supports %s or higher, "
"but you are running %s."
earnemacs-minimum-emacs-version emacs-version)))
;; Load!
(add-to-list 'load-path (expand-file-name "core/" user-emacs-directory))
(require 'earnemacs-vars)
(require 'earnemacs-packages)
(use-package earnemacs-main
:straight nil
:demand)
(provide 'init)
;;; init.el ends here