From 3eb18427a6c69beeb4507c490a01915e01d34c9c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 26 Jan 2021 21:18:12 -0600 Subject: Normalize line endings --- init.el | 96 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 2fdadb6..1ddb5f9 100644 --- a/init.el +++ b/init.el @@ -1,48 +1,48 @@ -;;; init.el -*- lexical-binding: t -*- -;; Copyright (C) 2020 Case Duckworth - -;; Author: Case Duckworth -;; Created: Sometime during the Covid-19 lockdown, 2019 -;; Keywords: configuration -;; URL: https://tildegit.org/acdw/emacs - -;; This file is not part of GNU Emacs. - -;;; Commentary: -;; This file is automatically tangled from config.org. -;; Hand edits will be overwritten! - -;;; Code: - -(setq-default load-prefer-newer t) - -(let* (;; Speed up init - (gc-cons-threshold most-positive-fixnum) - (file-name-handler-alist nil) - ;; Config file names - (config (expand-file-name "config" - user-emacs-directory)) - (config.el (concat config ".el")) - (config.org (concat config ".org")) - (straight-org-dir (expand-file-name "straight/build/org" - user-emacs-directory))) - ;; Okay, let's figure this out. - ;; `and' evaluates each form, and returns nil on the first that - ;; returns nil. `unless' only executes its body if the test - ;; returns nil. So. - ;; 1. Test if config.org is newer than config.el. If it is (t), we - ;; *want* to evaluate the body, so we need to negate that test. - ;; 2. Try to load the config. If it errors (nil), it'll bubble that - ;; to the `and' and the body will be evaluated. - (unless (and (not (file-newer-than-file-p config.org config.el)) - (load config :noerror)) - ;; A plain require here just loads the older `org' - ;; in Emacs' install dir. We need to add the newer - ;; one to the `load-path', hopefully that's all. - (when (file-exists-p straight-org-dir) - (add-to-list 'load-path straight-org-dir)) - ;; Load config.org - (require 'org) - (org-babel-load-file config.org))) - -;;; init.el ends here +;;; init.el -*- lexical-binding: t -*- +;; Copyright (C) 2020 Case Duckworth + +;; Author: Case Duckworth +;; Created: Sometime during the Covid-19 lockdown, 2019 +;; Keywords: configuration +;; URL: https://tildegit.org/acdw/emacs + +;; This file is not part of GNU Emacs. + +;;; Commentary: +;; This file is automatically tangled from config.org. +;; Hand edits will be overwritten! + +;;; Code: + +(setq-default load-prefer-newer t) + +(let* (;; Speed up init + (gc-cons-threshold most-positive-fixnum) + (file-name-handler-alist nil) + ;; Config file names + (config (expand-file-name "config" + user-emacs-directory)) + (config.el (concat config ".el")) + (config.org (concat config ".org")) + (straight-org-dir (expand-file-name "straight/build/org" + user-emacs-directory))) + ;; Okay, let's figure this out. + ;; `and' evaluates each form, and returns nil on the first that + ;; returns nil. `unless' only executes its body if the test + ;; returns nil. So. + ;; 1. Test if config.org is newer than config.el. If it is (t), we + ;; *want* to evaluate the body, so we need to negate that test. + ;; 2. Try to load the config. If it errors (nil), it'll bubble that + ;; to the `and' and the body will be evaluated. + (unless (and (not (file-newer-than-file-p config.org config.el)) + (load config :noerror)) + ;; A plain require here just loads the older `org' + ;; in Emacs' install dir. We need to add the newer + ;; one to the `load-path', hopefully that's all. + (when (file-exists-p straight-org-dir) + (add-to-list 'load-path straight-org-dir)) + ;; Load config.org + (require 'org) + (org-babel-load-file config.org))) + +;;; init.el ends here -- cgit 1.4.1-21-gabe81