Move core elisp code to core/
This commit is contained in:
parent
20bc61a85d
commit
3e1e036876
|
@ -7,7 +7,7 @@
|
|||
(package-initialize)
|
||||
(setq warning-minimum-level :error)
|
||||
|
||||
(load (concat user-emacs-directory "ht.el"))
|
||||
(load (concat spacemacs-core-directory "ht.el"))
|
||||
|
||||
(defvar spacemacs-config-layers '()
|
||||
"Alist of configuration layers with the form (symbol . plist) where
|
||||
|
@ -33,7 +33,8 @@ initialize the extension. ")
|
|||
"Declare a layer with SYM name (symbol). If CONTRIB is non nil then the layer
|
||||
is a contribution layer."
|
||||
(let* ((sym-name (symbol-name sym))
|
||||
(base-dir (if contrib contrib-config-directory user-emacs-directory))
|
||||
(base-dir (if contrib spacemacs-contrib-config-directory
|
||||
user-emacs-directory))
|
||||
(dir (format "%s%s/" base-dir sym-name))
|
||||
(ext-dir (format "%sextensions/" dir)))
|
||||
(push (cons sym (list :contrib contrib :dir dir :ext-dir ext-dir))
|
|
@ -1,3 +1,6 @@
|
|||
(define-derived-mode spacemacs-mode special-mode "spacemacs"
|
||||
"Spacemacs major mode for startup screen.")
|
||||
|
||||
(defun spacemacs-load-dotfile ()
|
||||
"Load ~/.spacemacs. If it is not found then copy .spacemacs.template to
|
||||
~/.spacemacs"
|
||||
|
@ -20,7 +23,7 @@
|
|||
(defun create-spacemacs-buf ()
|
||||
"Create and initialize the spacemacs startup buffer."
|
||||
(switch-to-buffer (get-buffer-create "*spacemacs*"))
|
||||
(insert-file-contents (concat user-emacs-directory "banner.txt"))
|
||||
(insert-file-contents (concat spacemacs-core-directory "banner.txt"))
|
||||
(redisplay))
|
||||
|
||||
(defun append-to-spacemacs-buf (msg)
|
15
init.el
15
init.el
|
@ -3,25 +3,30 @@
|
|||
(setq message-log-max 16384)
|
||||
(defconst emacs-start-time (current-time))
|
||||
|
||||
(load (concat user-emacs-directory "spacemacs.el"))
|
||||
|
||||
;; paths
|
||||
(defconst user-home-directory
|
||||
(expand-file-name (concat user-emacs-directory "../"))
|
||||
"User home directory (~/).")
|
||||
(defconst contrib-config-directory
|
||||
(defconst spacemacs-core-directory
|
||||
(expand-file-name (concat user-emacs-directory "core/"))
|
||||
"Spacemacs core directory.")
|
||||
(defconst spacemacs-contrib-config-directory
|
||||
(expand-file-name (concat user-emacs-directory "contrib/"))
|
||||
"Contribution layers base directory.")
|
||||
"Spacemacs contribution layers base directory.")
|
||||
(defconst user-dropbox-directory
|
||||
(expand-file-name (concat user-home-directory "Dropbox/"))
|
||||
"Dropbox directory.")
|
||||
;; if you have a dropbox, then ~/Dropbox/emacs is added to load path
|
||||
(add-to-list 'load-path (concat user-dropbox-directory "emacs/"))
|
||||
|
||||
;; load core source
|
||||
(dolist (elisp '("spacemacs.el" "contribsys.el"))
|
||||
(load (concat spacemacs-core-directory elisp)))
|
||||
|
||||
;; User configuration file for Spacemacs: ~/.spacemacs
|
||||
(spacemacs-load-dotfile)
|
||||
(dotspacemacs/init)
|
||||
|
||||
(load (concat user-emacs-directory "contribsys.el"))
|
||||
(contribsys/declare-layer 'spacemacs)
|
||||
(contribsys/declare-configuration-layers)
|
||||
(contribsys/load-layers)
|
||||
|
|
Loading…
Reference in New Issue