parent
821a185a42
commit
be8a62b220
|
@ -0,0 +1,27 @@
|
|||
(unless (featurep 'subr-x)
|
||||
;; `subr-x' function for Emacs 24.3 and below
|
||||
(defsubst string-join (strings &optional separator)
|
||||
"Join all STRINGS using SEPARATOR."
|
||||
(mapconcat 'identity strings separator))
|
||||
|
||||
(defsubst string-trim-left (string)
|
||||
"Remove leading whitespace from STRING."
|
||||
(if (string-match "\\`[ \t\n\r]+" string)
|
||||
(replace-match "" t t string)
|
||||
string))
|
||||
|
||||
(defsubst string-trim-right (string)
|
||||
"Remove trailing whitespace from STRING."
|
||||
(if (string-match "[ \t\n\r]+\\'" string)
|
||||
(replace-match "" t t string)
|
||||
string))
|
||||
|
||||
(defsubst string-trim (string)
|
||||
"Remove leading and trailing whitespace from STRING."
|
||||
(string-trim-left (string-trim-right string)))
|
||||
|
||||
(defsubst string-empty-p (string)
|
||||
"Check whether STRING is empty."
|
||||
(string= string "")))
|
||||
|
||||
(provide 'emacs-backports)
|
|
@ -1,7 +1,8 @@
|
|||
(setq message-log-max 16384)
|
||||
(defconst emacs-start-time (current-time))
|
||||
|
||||
(require 'subr-x)
|
||||
(require 'subr-x nil 'noerror)
|
||||
(require 'emacs-backports)
|
||||
|
||||
(defconst spacemacs-version "0.41.0"
|
||||
"Spacemacs version.")
|
||||
|
@ -9,11 +10,6 @@
|
|||
(defconst spacemacs-min-version "24.3"
|
||||
"Mininal required version of Emacs.")
|
||||
|
||||
(defconst spacemacs-core-directory
|
||||
(expand-file-name (concat user-emacs-directory "core/"))
|
||||
"Spacemacs core directory.")
|
||||
(add-to-list 'load-path spacemacs-core-directory)
|
||||
|
||||
(defconst spacemacs-banner-directory
|
||||
(expand-file-name (concat spacemacs-core-directory "banners/"))
|
||||
"Spacemacs banners directory.")
|
||||
|
@ -299,3 +295,5 @@ of size LOADING-DOTS-CHUNK-THRESHOLD."
|
|||
(insert-button "Update Spacemacs" 'action (lambda (b) (configuration-layer/update-packages)) 'follow-link t)
|
||||
(insert "\n\n")
|
||||
)
|
||||
|
||||
(provide 'spacemacs-mode)
|
||||
|
|
7
init.el
7
init.el
|
@ -1,4 +1,9 @@
|
|||
(load (concat user-emacs-directory "core/spacemacs-mode.el"))
|
||||
(defconst spacemacs-core-directory
|
||||
(expand-file-name (concat user-emacs-directory "core/"))
|
||||
"Spacemacs core directory.")
|
||||
(add-to-list 'load-path spacemacs-core-directory)
|
||||
|
||||
(require 'spacemacs-mode)
|
||||
(require 'configuration-layer)
|
||||
|
||||
(when (spacemacs/emacs-version-ok)
|
||||
|
|
Loading…
Reference in New Issue