 (defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))
 (defconst IS-BSD     (or IS-MAC (eq system-type 'berkeley-unix)))
 
+;; Ensure `doom-core-dir' is in `load-path'
+(add-to-list 'load-path (file-name-directory load-file-name))
+
+(defvar doom--initial-load-path load-path)
+(defvar doom--initial-process-environment process-environment)
+(defvar doom--initial-exec-path exec-path)
+(defvar doom--initial-file-name-handler-alist file-name-handler-alist)
+
+;; This is consulted on every `require', `load' and various path/io functions.
+;; You get a minor speed up by nooping this.
+(setq file-name-handler-alist nil)
+
+;; Load the bare necessities
+(require 'core-lib)
+
+
 ;;
+;;; Global variables
+
 (defvar doom-init-p nil
   "Non-nil if Doom has been initialized.")
 

\(easily) be launched from the correct shell session (particularly for MacOS
users).")

(defvar doom--initial-load-path load-path)
(defvar doom--initial-process-environment process-environment)
(defvar doom--initial-exec-path exec-path)
(defvar doom--initial-file-name-handler-alist file-name-handler-alist)

;;; Custom error types
(define-error 'doom-error "Error in Doom Emacs core")
(define-error 'doom-hook-error "Error in a Doom startup hook" 'doom-error)

(when (version< emacs-version "25.3")
  (error "Detected Emacs %s. Doom only supports Emacs 25.3 and higher"
         emacs-version))

(defconst doom-version "2.0.9"
  "Current version of Doom Emacs.")
