<commit_before>;;; core.el --- the heart of the beast -*- lexical-binding: t; -*-

(eval-when-compile
  (and (version< emacs-version "25")
       (error "Detected Emacs %s. Doom only supports Emacs 25.1 and higher"
              emacs-version)))

(defvar doom-debug-mode (or (getenv "DEBUG") init-file-debug)
  "If non-nil, all doom functions will be verbose. Set DEBUG=1 in the command
line or use --debug-init to enable this.")


;;
;; Constants

(defconst doom-version "2.0.9"
  "Current version of DOOM emacs.")

(defconst EMACS26+ (> emacs-major-version 25))
(defconst EMACS27+ (> emacs-major-version 26))

(defconst IS-MAC     (eq system-type 'darwin))
(defconst IS-LINUX   (eq system-type 'gnu/linux))
(defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))


;;
(defvar doom-emacs-dir
  (eval-when-compile (file-truename user-emacs-directory))
  "The path to this emacs.d directory. Must end in a slash.")

(defvar doom-core-dir (concat doom-emacs-dir "core/")
  "The root directory of core Doom files.")

(defvar doom-modules-dir (concat doom-emacs-dir "modules/")
  "The root directory for Doom's modules.")

(defvar doom-local-dir (concat doom-emacs-dir ".local/")
  "Root directory for local Emacs files. Use this as permanent storage for files
that are safe to share across systems (if this config is symlinked across
several computers).")

(defvar doom-etc-dir (concat doom-local-dir "etc/")
  "Directory for non-volatile storage.

Use this for files that don't change much, like servers binaries, external
dependencies or long-term shared data.")

(defvar doom-cache-dir (concat doom-local-dir "cache/")
  "Directory for volatile storage.

Use this for files that change often, like cache files.")

(defvar doom-packages-dir (concat doom-local-dir "packages/")
  "Where package.el and quelpa plugins (and their caches) are stored.")

(defvar doom-docs-dir (concat doom-emacs-dir "docs/")
  "Where the Doom manual is stored.")

(defvar doom-private-dir
  (or (getenv "DOOMDIR")
      (eval-when-compile
        (let ((xdg-path
               (expand-file-name "doom/"
                                 (or (getenv "XDG_CONFIG_HOME")
                                     "~/.config"))))
          (if (file-directory-p xdg-path) xdg-path)))
      "~/.doom.d/")
  "Where your private customizations are placed. Must end in a slash. Respects<commit_msg>Don't byte-compile xdg-path in doom-private-dir<commit_after>;;; core.el --- the heart of the beast -*- lexical-binding: t; -*-

(eval-when-compile
  (and (version< emacs-version "25")
       (error "Detected Emacs %s. Doom only supports Emacs 25.1 and higher"
              emacs-version)))

(defvar doom-debug-mode (or (getenv "DEBUG") init-file-debug)
  "If non-nil, all doom functions will be verbose. Set DEBUG=1 in the command
line or use --debug-init to enable this.")


;;
;; Constants

(defconst doom-version "2.0.9"
  "Current version of DOOM emacs.")

(defconst EMACS26+ (> emacs-major-version 25))
(defconst EMACS27+ (> emacs-major-version 26))

(defconst IS-MAC     (eq system-type 'darwin))
(defconst IS-LINUX   (eq system-type 'gnu/linux))
(defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))


;;
(defvar doom-emacs-dir
  (eval-when-compile (file-truename user-emacs-directory))
  "The path to this emacs.d directory. Must end in a slash.")

(defvar doom-core-dir (concat doom-emacs-dir "core/")
  "The root directory of core Doom files.")

(defvar doom-modules-dir (concat doom-emacs-dir "modules/")
  "The root directory for Doom's modules.")

(defvar doom-local-dir (concat doom-emacs-dir ".local/")
  "Root directory for local Emacs files. Use this as permanent storage for files
that are safe to share across systems (if this config is symlinked across
several computers).")

(defvar doom-etc-dir (concat doom-local-dir "etc/")
  "Directory for non-volatile storage.

Use this for files that don't change much, like servers binaries, external
dependencies or long-term shared data.")

(defvar doom-cache-dir (concat doom-local-dir "cache/")
  "Directory for volatile storage.

Use this for files that change often, like cache files.")

(defvar doom-packages-dir (concat doom-local-dir "packages/")
  "Where package.el and quelpa plugins (and their caches) are stored.")

(defvar doom-docs-dir (concat doom-emacs-dir "docs/")
  "Where the Doom manual is stored.")

(defvar doom-private-dir
  (or (getenv "DOOMDIR")
      (let ((xdg-path
             (expand-file-name "doom/"
                               (or (getenv "XDG_CONFIG_HOME")
                                   "~/.config"))))
        (if (file-directory-p xdg-path) xdg-path))
      "~/.doom.d/")
  "Where your private customizations are placed. Must end in a slash. Respects
{'fraction_non_alphanumeric': 0.12947368421052632, 'fraction_numerical': 0.007157894736842105, 'mean_word_length': 3.152972027972028, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7166484', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1516, 'n_words': 522}