This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/core/core-load-paths.el

75 lines
2.7 KiB
EmacsLisp
Raw Normal View History

2015-01-27 03:51:47 +00:00
;;; core-load-paths.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; 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))
(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)))
;; paths
(defvar spacemacs-start-directory
user-emacs-directory
"Spacemacs start directory.")
(defconst spacemacs-core-directory
(expand-file-name (concat spacemacs-start-directory "core/"))
"Spacemacs core directory.")
(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
(expand-file-name (concat spacemacs-info-directory "release-notes/"))
2015-04-13 06:17:48 +00:00
"Spacemacs release notes directory")
(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.")
(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")
(defconst spacemacs-auto-save-directory
(expand-file-name (concat spacemacs-cache-directory "auto-save/"))
"Spacemacs auto-save directory")
(defconst spacemacs-docs-directory
(expand-file-name (concat spacemacs-start-directory "doc/"))
"Spacemacs documentation directory.")
(defconst spacemacs-assets-directory
(expand-file-name (concat spacemacs-start-directory "assets/"))
"Spacemacs assets directory.")
(defconst spacemacs-test-directory
(expand-file-name (concat spacemacs-start-directory "tests/"))
"Spacemacs tests directory.")
2015-02-04 04:56:38 +00:00
(defconst user-home-directory
(expand-file-name "~/")
"User home directory (~/).")
(defconst pcache-directory
(concat spacemacs-cache-directory "pcache/"))
(unless (file-exists-p spacemacs-cache-directory)
(make-directory spacemacs-cache-directory))
2015-02-04 04:56:38 +00:00
;; load paths
(mapc 'add-to-load-path
`(
,(concat spacemacs-start-directory "core/")
,(concat spacemacs-start-directory "core/libs/")
,(concat spacemacs-start-directory "core/aprilfool/")
))