2015-01-27 03:51:47 +00:00
|
|
|
;;; core-load-paths.el --- Spacemacs Core File
|
2015-01-23 03:26:56 +00:00
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2015-01-23 03:26:56 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
(defun add-to-load-path (dir) (add-to-list 'load-path dir))
|
|
|
|
|
2016-07-06 00:28:37 +00:00
|
|
|
(defun add-to-load-path-if-exists (dir)
|
|
|
|
"If DIR exists in the file system, add it to `load-path'."
|
|
|
|
(when (file-exists-p dir)
|
|
|
|
(add-to-load-path dir)))
|
|
|
|
|
2015-01-25 04:58:24 +00:00
|
|
|
;; paths
|
2016-06-23 13:35:21 +00:00
|
|
|
(defvar spacemacs-start-directory
|
|
|
|
user-emacs-directory
|
|
|
|
"Spacemacs start directory.")
|
2015-01-25 04:58:24 +00:00
|
|
|
(defconst spacemacs-core-directory
|
2016-06-23 04:19:12 +00:00
|
|
|
(expand-file-name (concat spacemacs-start-directory "core/"))
|
2015-01-25 04:58:24 +00:00
|
|
|
"Spacemacs core directory.")
|
2018-06-25 06:16:27 +00:00
|
|
|
(defconst spacemacs-private-directory
|
|
|
|
(expand-file-name (concat spacemacs-start-directory "private/"))
|
|
|
|
"Spacemacs private directory.")
|
2015-04-23 02:30:00 +00:00
|
|
|
(defconst spacemacs-info-directory
|
|
|
|
(expand-file-name (concat spacemacs-core-directory "info/"))
|
|
|
|
"Spacemacs info files directory")
|
2015-04-13 06:17:48 +00:00
|
|
|
(defconst spacemacs-release-notes-directory
|
2015-04-23 02:30:00 +00:00
|
|
|
(expand-file-name (concat spacemacs-info-directory "release-notes/"))
|
2015-04-13 06:17:48 +00:00
|
|
|
"Spacemacs release notes directory")
|
2015-01-25 04:58:24 +00:00
|
|
|
(defconst spacemacs-banner-directory
|
|
|
|
(expand-file-name (concat spacemacs-core-directory "banners/"))
|
|
|
|
"Spacemacs banners directory.")
|
2015-03-13 03:55:38 +00:00
|
|
|
(defconst spacemacs-banner-official-png
|
|
|
|
(expand-file-name (concat spacemacs-banner-directory "img/spacemacs.png"))
|
|
|
|
"Spacemacs official banner image.")
|
2016-06-05 04:04:53 +00:00
|
|
|
(defconst spacemacs-badge-official-png
|
|
|
|
(expand-file-name (concat spacemacs-banner-directory
|
|
|
|
"img/spacemacs-badge.png"))
|
|
|
|
"Spacemacs official badge image.")
|
|
|
|
(defconst spacemacs-purple-heart-png
|
|
|
|
(expand-file-name (concat spacemacs-banner-directory "img/heart.png"))
|
|
|
|
"Purple heart emoji.")
|
2015-01-25 04:58:24 +00:00
|
|
|
(defconst spacemacs-cache-directory
|
|
|
|
(expand-file-name (concat user-emacs-directory ".cache/"))
|
2015-04-13 06:17:48 +00:00
|
|
|
"Spacemacs storage area for persistent files")
|
2015-06-19 03:54:07 +00:00
|
|
|
(defconst spacemacs-auto-save-directory
|
|
|
|
(expand-file-name (concat spacemacs-cache-directory "auto-save/"))
|
|
|
|
"Spacemacs auto-save directory")
|
2015-06-06 17:24:26 +00:00
|
|
|
(defconst spacemacs-docs-directory
|
2016-06-23 04:19:12 +00:00
|
|
|
(expand-file-name (concat spacemacs-start-directory "doc/"))
|
2015-06-06 17:24:26 +00:00
|
|
|
"Spacemacs documentation directory.")
|
2016-10-03 02:39:22 +00:00
|
|
|
(defconst spacemacs-news-directory
|
|
|
|
(expand-file-name (concat spacemacs-start-directory "news/"))
|
|
|
|
"Spacemacs News directory.")
|
2015-10-12 04:58:38 +00:00
|
|
|
(defconst spacemacs-assets-directory
|
2016-06-23 04:19:12 +00:00
|
|
|
(expand-file-name (concat spacemacs-start-directory "assets/"))
|
2015-10-12 04:58:38 +00:00
|
|
|
"Spacemacs assets directory.")
|
2015-07-31 08:30:42 +00:00
|
|
|
(defconst spacemacs-test-directory
|
2016-06-23 04:19:12 +00:00
|
|
|
(expand-file-name (concat spacemacs-start-directory "tests/"))
|
2015-07-31 08:30:42 +00:00
|
|
|
"Spacemacs tests directory.")
|
2015-02-04 04:56:38 +00:00
|
|
|
|
|
|
|
(defconst user-home-directory
|
|
|
|
(expand-file-name "~/")
|
|
|
|
"User home directory (~/).")
|
2015-01-25 04:58:24 +00:00
|
|
|
(defconst pcache-directory
|
2016-01-30 18:12:11 +00:00
|
|
|
(concat spacemacs-cache-directory "pcache/"))
|
2015-01-25 04:58:24 +00:00
|
|
|
(unless (file-exists-p spacemacs-cache-directory)
|
|
|
|
(make-directory spacemacs-cache-directory))
|
2015-02-04 04:56:38 +00:00
|
|
|
|
2015-01-25 04:58:24 +00:00
|
|
|
;; load paths
|
2015-01-23 03:26:56 +00:00
|
|
|
(mapc 'add-to-load-path
|
|
|
|
`(
|
2016-08-12 11:00:01 +00:00
|
|
|
,spacemacs-core-directory
|
|
|
|
,(concat spacemacs-core-directory "libs/")
|
2017-01-25 05:30:31 +00:00
|
|
|
,(concat spacemacs-core-directory "libs/spacemacs-theme/")
|
|
|
|
;; ,(concat spacemacs-core-directory "aprilfool/")
|
2015-01-23 03:26:56 +00:00
|
|
|
))
|
2017-01-25 05:30:31 +00:00
|
|
|
|
|
|
|
;; themes
|
|
|
|
(add-to-list 'custom-theme-load-path (concat spacemacs-core-directory
|
|
|
|
"libs/spacemacs-theme/"))
|
|
|
|
|